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": {
|
||||
"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
|
|
@ -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
|
||||
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
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
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