Update uncrafter menu texture
This commit is contained in:
parent
07923c885a
commit
47cb43305b
8 changed files with 24 additions and 9 deletions
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"variants": {
|
"variants": {
|
||||||
"facing=north": {
|
|
||||||
"model": "otemod:block/uncrafter"
|
|
||||||
},
|
|
||||||
"facing=east": {
|
"facing=east": {
|
||||||
"model": "otemod:block/uncrafter",
|
"model": "otemod:block/uncrafter",
|
||||||
"y": 90
|
"y": 90
|
||||||
},
|
},
|
||||||
|
"facing=north": {
|
||||||
|
"model": "otemod:block/uncrafter"
|
||||||
|
},
|
||||||
"facing=south": {
|
"facing=south": {
|
||||||
"model": "otemod:block/uncrafter",
|
"model": "otemod:block/uncrafter",
|
||||||
"y": 180
|
"y": 180
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "otemod:block/custommodel/uncrafter"
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "otemod:block/uncrafter"
|
||||||
|
}
|
|
@ -82,7 +82,7 @@ public class UncrafterBlockEntity extends BlockEntity implements MenuProvider
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
protected final ItemStackHandler outputItems = new ItemStackHandler((3*9)){
|
protected final ItemStackHandler outputItems = new ItemStackHandler(1){
|
||||||
@Override
|
@Override
|
||||||
protected void onContentsChanged(int slot) {
|
protected void onContentsChanged(int slot) {
|
||||||
setChanged();
|
setChanged();
|
||||||
|
@ -107,7 +107,7 @@ public class UncrafterBlockEntity extends BlockEntity implements MenuProvider
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Component getDisplayName() {
|
public Component getDisplayName() {
|
||||||
return Component.literal("Uncrafter");
|
return Component.literal("Uncrafting Factory");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class ModBlockStatesProvider extends BlockStateProvider {
|
||||||
stairBlock(ModBlocks.DIRTY_GREEN_POOL_TILE_STAIRS, ModBlocks.DIRTY_GREEN_POOL_TILE);
|
stairBlock(ModBlocks.DIRTY_GREEN_POOL_TILE_STAIRS, ModBlocks.DIRTY_GREEN_POOL_TILE);
|
||||||
slabBlock(ModBlocks.DIRTY_GREEN_POOL_TILE_SLAB, ModBlocks.DIRTY_GREEN_POOL_TILE);
|
slabBlock(ModBlocks.DIRTY_GREEN_POOL_TILE_SLAB, ModBlocks.DIRTY_GREEN_POOL_TILE);
|
||||||
|
|
||||||
blockWithExistingModel(ModBlocks.UNCRAFTER, "block/custommodels/uncrafter", true);
|
blockWithExistingModel(ModBlocks.UNCRAFTER, "block/custommodel/uncrafter", true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,15 +12,24 @@ import java.util.List;
|
||||||
|
|
||||||
public class PartialItem extends Item
|
public class PartialItem extends Item
|
||||||
{
|
{
|
||||||
int uncraftSteps = 0;
|
private static final String TAG_UNCRAFT_REMAIN = "remaining";
|
||||||
|
|
||||||
public PartialItem() {
|
public PartialItem() {
|
||||||
super (new Properties().fireResistant());
|
super (new Properties().fireResistant());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void appendHoverText(ItemStack p_41421_, @Nullable Level p_41422_, List<Component> tooltip, TooltipFlag p_41424_) {
|
public void appendHoverText(ItemStack stack, @Nullable Level p_41422_, List<Component> tooltip, TooltipFlag p_41424_) {
|
||||||
tooltip.add(ChatHelpers.macro("!Yellow!This is a partially deconstructed item."));
|
tooltip.add(ChatHelpers.macro("!Yellow!This is a partially deconstructed item."));
|
||||||
tooltip.add(ChatHelpers.macro("!Dark_Red!Steps remaining to uncraft: [0]", "!Yellow!" + uncraftSteps));
|
|
||||||
|
if(stack.getTag()!= null)
|
||||||
|
{
|
||||||
|
if(stack.getTag().contains(TAG_UNCRAFT_REMAIN))
|
||||||
|
{
|
||||||
|
tooltip.add(ChatHelpers.macro("!Dark_Red!Number of uncraft steps remaining: [0]", "!Yellow!" + stack.getTag().getInt(TAG_UNCRAFT_REMAIN)));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tooltip.add(ChatHelpers.macro("!Dark_Red!This partial item appears to be invalid, and contains no item fragments."));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
BIN
src/main/resources/assets/otemod/textures/gui/uncrafter.aseprite
Normal file
BIN
src/main/resources/assets/otemod/textures/gui/uncrafter.aseprite
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 19 KiB |
Reference in a new issue