Update uncrafter menu texture

This commit is contained in:
Zontreck 2024-03-03 21:54:02 -07:00
parent 07923c885a
commit 47cb43305b
8 changed files with 24 additions and 9 deletions

View file

@ -1,12 +1,12 @@
{
"variants": {
"facing=north": {
"model": "otemod:block/uncrafter"
},
"facing=east": {
"model": "otemod:block/uncrafter",
"y": 90
},
"facing=north": {
"model": "otemod:block/uncrafter"
},
"facing=south": {
"model": "otemod:block/uncrafter",
"y": 180

View file

@ -0,0 +1,3 @@
{
"parent": "otemod:block/custommodel/uncrafter"
}

View file

@ -0,0 +1,3 @@
{
"parent": "otemod:block/uncrafter"
}

View file

@ -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
protected void onContentsChanged(int slot) {
setChanged();
@ -107,7 +107,7 @@ public class UncrafterBlockEntity extends BlockEntity implements MenuProvider
@Override
public Component getDisplayName() {
return Component.literal("Uncrafter");
return Component.literal("Uncrafting Factory");
}
@Nullable

View file

@ -75,7 +75,7 @@ public class ModBlockStatesProvider extends BlockStateProvider {
stairBlock(ModBlocks.DIRTY_GREEN_POOL_TILE_STAIRS, 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);
}

View file

@ -12,15 +12,24 @@ import java.util.List;
public class PartialItem extends Item
{
int uncraftSteps = 0;
private static final String TAG_UNCRAFT_REMAIN = "remaining";
public PartialItem() {
super (new Properties().fireResistant());
}
@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("!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."));
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 19 KiB