diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 84f8bed5..0a7c8f77 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -75,7 +75,7 @@ eba349242058c25b08e12c23f6622e2863ed6e65 assets/ultramarine/blockstates/blue_tig b4cd79c0aec9cc5fa980eccb7f9a741c7f4eb1ff assets/ultramarine/blockstates/bookshelf_variant.json f81b9db44f699639f921906fd160b10898470dfc assets/ultramarine/blockstates/boots.json 8a747dae7655e10a589bb1bc4686a81b377cec10 assets/ultramarine/blockstates/bottle_gourd.json -ffce753e2aa033a99e34e4881404133aa31c35ae assets/ultramarine/blockstates/brick_furnace.json +02a1c4c578bb5b20d35b7f01fac8afef53f5a9f1 assets/ultramarine/blockstates/brick_kiln.json c7f9893f2e2d75bf1322c6f0c97a327959a07ee1 assets/ultramarine/blockstates/bronze_censer.json 6a26c03f2664227da4bb88aed2b82d6b42a6913c assets/ultramarine/blockstates/bronze_ding.json 69689319c864599281b41f794e8cae7525baea8d assets/ultramarine/blockstates/bronze_mirror.json @@ -520,7 +520,7 @@ b37a8d5e8a61d34ba399a34058b537d29e6231a4 assets/ultramarine/models/block/blue_ro 42ccf27f321f4cd779190a37df5cc4262d0736aa assets/ultramarine/models/block/blue_zhaotou_edge.json 5630a3106522e6da1bd57af27209da356c36e911 assets/ultramarine/models/block/bookshelf.json 8f54ac1a727863f84a6d569f11cfc038be196866 assets/ultramarine/models/block/bookshelf_variant.json -85727b032005f9fe44f8ba0883f143098d2fb370 assets/ultramarine/models/block/brick_furnace.json +f4362446523afb60a38f88b6c926b82ecc12ac21 assets/ultramarine/models/block/brick_kiln.json 7714dcc40948e5bc1e5038d4cb6d3946f1924e28 assets/ultramarine/models/block/brownish_red_stone_brick_slab.json 4ef7ec1bc6069047bd3999e97b2cf5fb205ad692 assets/ultramarine/models/block/brownish_red_stone_brick_slab_top.json 99569f17f44398dea6b56ab7b8dd2bb45ebd6940 assets/ultramarine/models/block/brownish_red_stone_brick_stairs.json @@ -836,7 +836,7 @@ d529ea65a790c86d2c5df20cc5377d37fafed09f assets/ultramarine/models/item/book_sta d6272fbe328daf58aa1ece48b6b3370e21dc0167 assets/ultramarine/models/item/bookshelf_variant.json f5f2d620ee60eaed08cc4f7d72196a5d16beeb65 assets/ultramarine/models/item/boots.json 986589ad794f224018df01b2fa32473e433fe11a assets/ultramarine/models/item/bottle_gourd.json -44233bed4286f0764fa73144671fd634ebd4cb07 assets/ultramarine/models/item/brick_furnace.json +b64a4d0485096790f66401d28b2bd0de0855e7d3 assets/ultramarine/models/item/brick_kiln.json e33dadca3ebea210fc288905fc5ebbfc8d5172a8 assets/ultramarine/models/item/bronze_censer.json 19be52f5da2385c798ed666a62f4cd4ca1713709 assets/ultramarine/models/item/bronze_ding.json 4c8ea4168b34e9356ed2ef7597e08e0f3ec7865d assets/ultramarine/models/item/bronze_mirror.json @@ -1259,7 +1259,7 @@ e48e56ce7a08d5506893c975360626e425e808ea assets/ultramarine/models/item/yellow_s bb3cff8ef2b03825fc5bbeffb336436d70edcaa4 data/minecraft/tags/blocks/fences.json 82d6e6cfa5277af14e962ba26c3f95f28d32126e data/minecraft/tags/blocks/mineable/axe.json f322d81978eac3de4a54e222a418652bf27462bb data/minecraft/tags/blocks/mineable/hoe.json -027cdefea1acb40b35fdda9a86e8ac27fc90b905 data/minecraft/tags/blocks/mineable/pickaxe.json +20bf4d8729d06eb848778d356074d911117eb7b8 data/minecraft/tags/blocks/mineable/pickaxe.json 17545dd0c9613eb0477c89b2b64307a497bc1d58 data/minecraft/tags/blocks/needs_iron_tool.json 9a78734519a787b16bc1a768f35bcbf3e480d116 data/minecraft/tags/blocks/needs_stone_tool.json 3186ba1b362c329daa8cf80a8536319b79fa838a data/minecraft/tags/blocks/planks.json @@ -1481,7 +1481,7 @@ b526760271d5011e9bcc46f9bf127103ca93d006 data/ultramarine/loot_tables/blocks/boo b1dfd8d1e39635826a604b935c98c7adc7675ed5 data/ultramarine/loot_tables/blocks/bookshelf_variant.json 0041e43e4f2ff3a7b15616214bfc9384add2d01f data/ultramarine/loot_tables/blocks/boots.json 046987bdb93d3e2ba620fc8ac55bd819996a7d74 data/ultramarine/loot_tables/blocks/bottle_gourd.json -c232e33c2a8f5dda0550807e1f4a1d70384788be data/ultramarine/loot_tables/blocks/brick_furnace.json +2b328a517423326d81c8835c7a023771759f3539 data/ultramarine/loot_tables/blocks/brick_kiln.json ce1d13f0ef66b425ad476a5eb52fd3a1d3c0068f data/ultramarine/loot_tables/blocks/bronze_censer.json 26d4872a3bd9d20245a4fb3709f8231e188aafcd data/ultramarine/loot_tables/blocks/bronze_ding.json 10bd9c5475c30422349c5c90fd3ae2f6d1fd6c77 data/ultramarine/loot_tables/blocks/bronze_mirror.json diff --git a/src/generated/resources/assets/ultramarine/blockstates/brick_furnace.json b/src/generated/resources/assets/ultramarine/blockstates/brick_furnace.json deleted file mode 100644 index 68953661..00000000 --- a/src/generated/resources/assets/ultramarine/blockstates/brick_furnace.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "ultramarine:block/brick_furnace" - } - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/ultramarine/blockstates/brick_kiln.json b/src/generated/resources/assets/ultramarine/blockstates/brick_kiln.json new file mode 100644 index 00000000..a9c3f182 --- /dev/null +++ b/src/generated/resources/assets/ultramarine/blockstates/brick_kiln.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "ultramarine:block/brick_kiln" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/ultramarine/models/block/brick_furnace.json b/src/generated/resources/assets/ultramarine/models/block/brick_kiln.json similarity index 58% rename from src/generated/resources/assets/ultramarine/models/block/brick_furnace.json rename to src/generated/resources/assets/ultramarine/models/block/brick_kiln.json index 7cbbe736..014ebeb6 100644 --- a/src/generated/resources/assets/ultramarine/models/block/brick_furnace.json +++ b/src/generated/resources/assets/ultramarine/models/block/brick_kiln.json @@ -1,6 +1,6 @@ { "parent": "minecraft:block/cube_all", "textures": { - "all": "ultramarine:block/brick_furnace" + "all": "ultramarine:block/brick_kiln" } } \ No newline at end of file diff --git a/src/generated/resources/assets/ultramarine/models/item/brick_furnace.json b/src/generated/resources/assets/ultramarine/models/item/brick_furnace.json deleted file mode 100644 index 35392143..00000000 --- a/src/generated/resources/assets/ultramarine/models/item/brick_furnace.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "ultramarine:block/brick_furnace" -} \ No newline at end of file diff --git a/src/generated/resources/assets/ultramarine/models/item/brick_kiln.json b/src/generated/resources/assets/ultramarine/models/item/brick_kiln.json new file mode 100644 index 00000000..c65d8413 --- /dev/null +++ b/src/generated/resources/assets/ultramarine/models/item/brick_kiln.json @@ -0,0 +1,3 @@ +{ + "parent": "ultramarine:block/brick_kiln" +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 6e233e96..5a4df1d8 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -134,7 +134,7 @@ "ultramarine:stone_lamp", "ultramarine:tricolor_candlestick", "ultramarine:jade_candlestick", - "ultramarine:brick_furnace", + "ultramarine:brick_kiln", "ultramarine:gray_roof_tiles", "ultramarine:gray_roof_tile_stairs", "ultramarine:gray_roof_tile_edge", diff --git a/src/generated/resources/data/ultramarine/loot_tables/blocks/brick_furnace.json b/src/generated/resources/data/ultramarine/loot_tables/blocks/brick_kiln.json similarity index 71% rename from src/generated/resources/data/ultramarine/loot_tables/blocks/brick_furnace.json rename to src/generated/resources/data/ultramarine/loot_tables/blocks/brick_kiln.json index d1acb6db..603baf7b 100644 --- a/src/generated/resources/data/ultramarine/loot_tables/blocks/brick_furnace.json +++ b/src/generated/resources/data/ultramarine/loot_tables/blocks/brick_kiln.json @@ -2,13 +2,13 @@ "type": "minecraft:block", "pools": [ { - "name": "brick_furnace", + "name": "brick_kiln", "rolls": 1.0, "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", - "name": "ultramarine:brick_furnace" + "name": "ultramarine:brick_kiln" } ] } diff --git a/src/main/java/com/voxelutopia/ultramarine/client/event/ModClientRenderEventHandler.java b/src/main/java/com/voxelutopia/ultramarine/client/event/ModClientRenderEventHandler.java index 31c9a616..393ee0cd 100644 --- a/src/main/java/com/voxelutopia/ultramarine/client/event/ModClientRenderEventHandler.java +++ b/src/main/java/com/voxelutopia/ultramarine/client/event/ModClientRenderEventHandler.java @@ -1,7 +1,7 @@ package com.voxelutopia.ultramarine.client.event; import com.voxelutopia.ultramarine.client.render.SeatEntityRenderer; -import com.voxelutopia.ultramarine.client.screen.BrickFurnaceScreen; +import com.voxelutopia.ultramarine.client.screen.BrickKilnScreen; import com.voxelutopia.ultramarine.client.screen.ContainerDecorativeBlockScreen; import com.voxelutopia.ultramarine.client.screen.WoodworkingWorkbenchScreen; import com.voxelutopia.ultramarine.data.registry.BlockRegistry; @@ -175,7 +175,7 @@ private static void registerMenuScreens(FMLClientSetupEvent e) { MenuScreens.register(MenuTypeRegistry.CONTAINER_DECORATIVE_BLOCK_MENU_FOOD_9X3.get(), ContainerDecorativeBlockScreen::new); MenuScreens.register(MenuTypeRegistry.CONTAINER_DECORATIVE_BLOCK_MENU_FOOD_9X6.get(), ContainerDecorativeBlockScreen::new); MenuScreens.register(MenuTypeRegistry.WOODWORKING_WORKBENCH.get(), WoodworkingWorkbenchScreen::new); - MenuScreens.register(MenuTypeRegistry.BRICK_FURNACE.get(), BrickFurnaceScreen::new); + MenuScreens.register(MenuTypeRegistry.BRICK_KILN.get(), BrickKilnScreen::new); }); } diff --git a/src/main/java/com/voxelutopia/ultramarine/client/screen/BrickFurnaceScreen.java b/src/main/java/com/voxelutopia/ultramarine/client/screen/BrickKilnScreen.java similarity index 82% rename from src/main/java/com/voxelutopia/ultramarine/client/screen/BrickFurnaceScreen.java rename to src/main/java/com/voxelutopia/ultramarine/client/screen/BrickKilnScreen.java index 1865cf21..c82537bd 100644 --- a/src/main/java/com/voxelutopia/ultramarine/client/screen/BrickFurnaceScreen.java +++ b/src/main/java/com/voxelutopia/ultramarine/client/screen/BrickKilnScreen.java @@ -3,8 +3,7 @@ import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; import com.voxelutopia.ultramarine.Ultramarine; -import com.voxelutopia.ultramarine.world.block.menu.BrickFurnaceMenu; -import com.voxelutopia.ultramarine.world.block.menu.WoodworkingWorkbenchMenu; +import com.voxelutopia.ultramarine.world.block.menu.BrickKlinMenu; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; import net.minecraft.client.renderer.GameRenderer; @@ -12,11 +11,11 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; -public class BrickFurnaceScreen extends AbstractContainerScreen { +public class BrickKilnScreen extends AbstractContainerScreen { - private static final ResourceLocation BACKGROUND = new ResourceLocation(Ultramarine.MOD_ID, "textures/gui/brick_furnace.png"); + private static final ResourceLocation BACKGROUND = new ResourceLocation(Ultramarine.MOD_ID, "textures/gui/brick_kiln.png"); - public BrickFurnaceScreen(BrickFurnaceMenu pMenu, Inventory pPlayerInventory, Component pTitle) { + public BrickKilnScreen(BrickKlinMenu pMenu, Inventory pPlayerInventory, Component pTitle) { super(pMenu, pPlayerInventory, pTitle); } diff --git a/src/main/java/com/voxelutopia/ultramarine/data/recipe/CompositeSmeltingRecipe.java b/src/main/java/com/voxelutopia/ultramarine/data/recipe/CompositeSmeltingRecipe.java index ebb3ee58..96946030 100644 --- a/src/main/java/com/voxelutopia/ultramarine/data/recipe/CompositeSmeltingRecipe.java +++ b/src/main/java/com/voxelutopia/ultramarine/data/recipe/CompositeSmeltingRecipe.java @@ -6,7 +6,7 @@ import com.voxelutopia.ultramarine.Ultramarine; import com.voxelutopia.ultramarine.data.registry.RecipeSerializerRegistry; import com.voxelutopia.ultramarine.data.registry.RecipeTypeRegistry; -import com.voxelutopia.ultramarine.world.block.entity.BrickFurnaceBlockEntity; +import com.voxelutopia.ultramarine.world.block.entity.BrickKilnBlockEntity; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.GsonHelper; @@ -17,8 +17,6 @@ import net.minecraftforge.registries.ForgeRegistries; import org.jetbrains.annotations.Nullable; -import java.util.stream.Stream; - public class CompositeSmeltingRecipe implements Recipe { protected final ResourceLocation id; @@ -41,8 +39,8 @@ public CompositeSmeltingRecipe(ResourceLocation pId, String pGroup, Ingredient p @Override public boolean matches(Container pContainer, Level pLevel) { - return this.primaryIngredient.test(pContainer.getItem(BrickFurnaceBlockEntity.SLOT_INPUT_PRIMARY)) && - this.secondaryIngredient.test(pContainer.getItem(BrickFurnaceBlockEntity.SLOT_INPUT_SECONDARY)); + return this.primaryIngredient.test(pContainer.getItem(BrickKilnBlockEntity.SLOT_INPUT_PRIMARY)) && + this.secondaryIngredient.test(pContainer.getItem(BrickKilnBlockEntity.SLOT_INPUT_SECONDARY)); } public boolean partialMatch(Container pContainer, Level pLevel) { diff --git a/src/main/java/com/voxelutopia/ultramarine/data/registry/BlockEntityRegistry.java b/src/main/java/com/voxelutopia/ultramarine/data/registry/BlockEntityRegistry.java index ca8e2776..4da8596a 100644 --- a/src/main/java/com/voxelutopia/ultramarine/data/registry/BlockEntityRegistry.java +++ b/src/main/java/com/voxelutopia/ultramarine/data/registry/BlockEntityRegistry.java @@ -31,9 +31,9 @@ public class BlockEntityRegistry { BOTTLE_GOURD = BLOCK_ENTITIES.register( "bottle_gourd_entity", () -> BlockEntityType.Builder .of(BottleGourdBlockEntity::new, BlockRegistry.BOTTLE_GOURD.get()).build(null)); - public static final RegistryObject> - BRICK_FURNACE = BLOCK_ENTITIES.register( - "brick_furnace_block_entity", () -> BlockEntityType.Builder - .of(BrickFurnaceBlockEntity::new, BlockRegistry.BRICK_FURNACE.get()).build(null)); + public static final RegistryObject> + BRICK_KILN = BLOCK_ENTITIES.register( + "brick_kiln_block_entity", () -> BlockEntityType.Builder + .of(BrickKilnBlockEntity::new, BlockRegistry.BRICK_KILN.get()).build(null)); } diff --git a/src/main/java/com/voxelutopia/ultramarine/data/registry/BlockRegistry.java b/src/main/java/com/voxelutopia/ultramarine/data/registry/BlockRegistry.java index a2c5b036..cfc9b0a7 100644 --- a/src/main/java/com/voxelutopia/ultramarine/data/registry/BlockRegistry.java +++ b/src/main/java/com/voxelutopia/ultramarine/data/registry/BlockRegistry.java @@ -821,7 +821,7 @@ public class BlockRegistry { */ public static final RegistryObject WOODWORKING_WORKBENCH = BLOCKS.register("woodworking_workbench", WoodworkingWorkBench::new); - public static final RegistryObject BRICK_FURNACE = BLOCKS.register("brick_furnace", BrickFurnace::new); + public static final RegistryObject BRICK_KILN = BLOCKS.register("brick_kiln", BrickKiln::new); private static RegistryObject simpleBlock(String name, Material material) { return BLOCKS.register(name, () -> new Block(BlockBehaviour.Properties.of(material))); diff --git a/src/main/java/com/voxelutopia/ultramarine/data/registry/ItemRegistry.java b/src/main/java/com/voxelutopia/ultramarine/data/registry/ItemRegistry.java index 0f5a7ef1..feb0e433 100644 --- a/src/main/java/com/voxelutopia/ultramarine/data/registry/ItemRegistry.java +++ b/src/main/java/com/voxelutopia/ultramarine/data/registry/ItemRegistry.java @@ -721,7 +721,7 @@ public class ItemRegistry { public static final RegistryObject WOODEN_MALLET = ITEMS.register("wooden_mallet", WoodenMallet::new); public static final RegistryObject WOODWORKING_WORKBENCH = fromBlock(BlockRegistry.WOODWORKING_WORKBENCH, ModCreativeTab.TOOLS); - public static final RegistryObject BRICK_FURNACE = fromBlock(BlockRegistry.BRICK_FURNACE, ModCreativeTab.TOOLS); + public static final RegistryObject BRICK_FURNACE = fromBlock(BlockRegistry.BRICK_KILN, ModCreativeTab.TOOLS); private static RegistryObject fromBlock(RegistryObject block, ModCreativeTab tabDef) { RegistryObject registryObject = ITEMS.register(block.getId().getPath(), () -> new BlockItem(block.get(), new Item.Properties().tab(tabDef.getTab()))); diff --git a/src/main/java/com/voxelutopia/ultramarine/data/registry/MenuTypeRegistry.java b/src/main/java/com/voxelutopia/ultramarine/data/registry/MenuTypeRegistry.java index d9e5977a..76e65acf 100644 --- a/src/main/java/com/voxelutopia/ultramarine/data/registry/MenuTypeRegistry.java +++ b/src/main/java/com/voxelutopia/ultramarine/data/registry/MenuTypeRegistry.java @@ -1,7 +1,7 @@ package com.voxelutopia.ultramarine.data.registry; import com.voxelutopia.ultramarine.Ultramarine; -import com.voxelutopia.ultramarine.world.block.menu.BrickFurnaceMenu; +import com.voxelutopia.ultramarine.world.block.menu.BrickKlinMenu; import com.voxelutopia.ultramarine.world.block.menu.ContainerDecorativeBlockMenu; import com.voxelutopia.ultramarine.world.block.menu.WoodworkingWorkbenchMenu; import net.minecraft.world.inventory.MenuType; @@ -26,7 +26,7 @@ public class MenuTypeRegistry { () -> IForgeMenuType.create((windowId, inv, data) -> ContainerDecorativeBlockMenu.foodSixRows(windowId, inv))); public static final RegistryObject> WOODWORKING_WORKBENCH = MENU_TYPES.register("woodworking_workbench", () -> IForgeMenuType.create((windowId, inv, data) -> new WoodworkingWorkbenchMenu(windowId, inv))); - public static final RegistryObject> BRICK_FURNACE = MENU_TYPES.register("brick_furnace", - () -> IForgeMenuType.create((windowId, inv, data) -> new BrickFurnaceMenu(windowId, data.readBlockPos(), inv))); + public static final RegistryObject> BRICK_KILN = MENU_TYPES.register("brick_kiln", + () -> IForgeMenuType.create((windowId, inv, data) -> new BrickKlinMenu(windowId, data.readBlockPos(), inv))); } diff --git a/src/main/java/com/voxelutopia/ultramarine/datagen/ModBlockModelProvider.java b/src/main/java/com/voxelutopia/ultramarine/datagen/ModBlockModelProvider.java index cfcceef6..0edb8e8f 100644 --- a/src/main/java/com/voxelutopia/ultramarine/datagen/ModBlockModelProvider.java +++ b/src/main/java/com/voxelutopia/ultramarine/datagen/ModBlockModelProvider.java @@ -1,7 +1,6 @@ package com.voxelutopia.ultramarine.datagen; import com.voxelutopia.ultramarine.data.registry.BlockRegistry; -import com.voxelutopia.ultramarine.data.registry.ItemRegistry; import com.voxelutopia.ultramarine.world.block.state.ChiralBlockType; import com.voxelutopia.ultramarine.world.block.state.ModBlockStateProperties; import com.voxelutopia.ultramarine.world.block.*; @@ -344,7 +343,7 @@ else if (block instanceof SixSideBlock sixSideBlock){ simpleBlock(BlockRegistry.HEMATITE_ORE.get()); //TEMP TODO - simpleBlock(BlockRegistry.BRICK_FURNACE.get()); + simpleBlock(BlockRegistry.BRICK_KILN.get()); } private ResourceLocation blockLoc(Block block){ diff --git a/src/main/java/com/voxelutopia/ultramarine/world/block/BrickFurnace.java b/src/main/java/com/voxelutopia/ultramarine/world/block/BrickKiln.java similarity index 80% rename from src/main/java/com/voxelutopia/ultramarine/world/block/BrickFurnace.java rename to src/main/java/com/voxelutopia/ultramarine/world/block/BrickKiln.java index c68869a9..529abba8 100644 --- a/src/main/java/com/voxelutopia/ultramarine/world/block/BrickFurnace.java +++ b/src/main/java/com/voxelutopia/ultramarine/world/block/BrickKiln.java @@ -2,21 +2,14 @@ import com.voxelutopia.ultramarine.data.registry.BlockEntityRegistry; import com.voxelutopia.ultramarine.world.block.entity.BlockEntityHelper; -import com.voxelutopia.ultramarine.world.block.entity.BrickFurnaceBlockEntity; -import com.voxelutopia.ultramarine.world.block.entity.CenserBlockEntity; -import com.voxelutopia.ultramarine.world.block.menu.BrickFurnaceMenu; -import com.voxelutopia.ultramarine.world.block.menu.WoodworkingWorkbenchMenu; +import com.voxelutopia.ultramarine.world.block.entity.BrickKilnBlockEntity; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.NonNullList; -import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; -import net.minecraft.stats.Stats; import net.minecraft.world.*; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.inventory.ContainerLevelAccess; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; @@ -30,16 +23,15 @@ import net.minecraft.world.level.block.state.properties.DirectionProperty; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.items.ItemStackHandler; import net.minecraftforge.network.NetworkHooks; import org.jetbrains.annotations.Nullable; -public class BrickFurnace extends Block implements EntityBlock, BaseBlockPropertyHolder { +public class BrickKiln extends Block implements EntityBlock, BaseBlockPropertyHolder { public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING; public static final BooleanProperty LIT = BlockStateProperties.LIT; - public BrickFurnace() { + public BrickKiln() { super(BaseBlockProperty.STONE.properties); this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(LIT, Boolean.FALSE)); } @@ -47,14 +39,14 @@ public BrickFurnace() { @Nullable @Override public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) { - return new BrickFurnaceBlockEntity(pPos, pState); + return new BrickKilnBlockEntity(pPos, pState); } @Nullable @Override public BlockEntityTicker getTicker(Level pLevel, BlockState pState, BlockEntityType pBlockEntityType) { return pLevel.isClientSide ? null : - BlockEntityHelper.createTickerHelper(pBlockEntityType, (BlockEntityType) BlockEntityRegistry.BRICK_FURNACE.get(), BrickFurnaceBlockEntity::serverTick); + BlockEntityHelper.createTickerHelper(pBlockEntityType, (BlockEntityType) BlockEntityRegistry.BRICK_KILN.get(), BrickKilnBlockEntity::serverTick); } @Override @@ -63,7 +55,7 @@ public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Pla return InteractionResult.SUCCESS; } else { BlockEntity blockentity = pLevel.getBlockEntity(pPos); - if (blockentity instanceof BrickFurnaceBlockEntity furnaceBlockEntity) { + if (blockentity instanceof BrickKilnBlockEntity furnaceBlockEntity) { NetworkHooks.openGui((ServerPlayer) pPlayer, furnaceBlockEntity, pPos); return InteractionResult.CONSUME; } @@ -76,7 +68,7 @@ public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Pla public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState pNewState, boolean pIsMoving) { if (!pState.is(pNewState.getBlock())) { BlockEntity blockentity = pLevel.getBlockEntity(pPos); - if (blockentity instanceof BrickFurnaceBlockEntity furnace) { + if (blockentity instanceof BrickKilnBlockEntity furnace) { if (pLevel instanceof ServerLevel) { Containers.dropContents(pLevel, pPos, NonNullList.of( diff --git a/src/main/java/com/voxelutopia/ultramarine/world/block/entity/BrickFurnaceBlockEntity.java b/src/main/java/com/voxelutopia/ultramarine/world/block/entity/BrickKilnBlockEntity.java similarity index 88% rename from src/main/java/com/voxelutopia/ultramarine/world/block/entity/BrickFurnaceBlockEntity.java rename to src/main/java/com/voxelutopia/ultramarine/world/block/entity/BrickKilnBlockEntity.java index cde71505..2a647897 100644 --- a/src/main/java/com/voxelutopia/ultramarine/world/block/entity/BrickFurnaceBlockEntity.java +++ b/src/main/java/com/voxelutopia/ultramarine/world/block/entity/BrickKilnBlockEntity.java @@ -4,14 +4,12 @@ import com.voxelutopia.ultramarine.data.recipe.CompositeSmeltingRecipe; import com.voxelutopia.ultramarine.data.registry.BlockEntityRegistry; import com.voxelutopia.ultramarine.data.registry.RecipeTypeRegistry; -import com.voxelutopia.ultramarine.world.block.BrickFurnace; -import com.voxelutopia.ultramarine.world.block.menu.BrickFurnaceMenu; +import com.voxelutopia.ultramarine.world.block.menu.BrickKlinMenu; import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.core.NonNullList; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.network.chat.Component; @@ -27,24 +25,18 @@ import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.ContainerData; import net.minecraft.world.inventory.RecipeHolder; -import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.AbstractCookingRecipe; import net.minecraft.world.item.crafting.Recipe; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.AbstractFurnaceBlock; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.ItemHandlerHelper; import net.minecraftforge.items.ItemStackHandler; import net.minecraftforge.items.wrapper.CombinedInvWrapper; import net.minecraftforge.items.wrapper.RecipeWrapper; @@ -57,7 +49,7 @@ @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault @SuppressWarnings("unused") -public class BrickFurnaceBlockEntity extends BlockEntity implements MenuProvider, RecipeHolder { +public class BrickKilnBlockEntity extends BlockEntity implements MenuProvider, RecipeHolder { public static final int SLOT_INPUT_PRIMARY = 0; public static final int SLOT_INPUT_SECONDARY = 1; @@ -72,7 +64,7 @@ public class BrickFurnaceBlockEntity extends BlockEntity implements MenuProvider public static final int BURN_TIME_STANDARD = 200; public static final int BURN_COOL_SPEED = 2; - private static final Component CONTAINER_TITLE = new TranslatableComponent("container.brick_furnace"); + private static final Component CONTAINER_TITLE = new TranslatableComponent("container.brick_kiln"); int litTime; int litDuration; @@ -117,20 +109,20 @@ public boolean isItemValid(int slot, @NotNull ItemStack stack) { protected final ContainerData dataAccess = new ContainerData() { public int get(int key) { return switch (key) { - case DATA_LIT_TIME -> BrickFurnaceBlockEntity.this.litTime; - case DATA_LIT_DURATION -> BrickFurnaceBlockEntity.this.litDuration; - case DATA_COOKING_PROGRESS -> BrickFurnaceBlockEntity.this.cookingProgress; - case DATA_COOKING_TOTAL_TIME -> BrickFurnaceBlockEntity.this.cookingTotalTime; + case DATA_LIT_TIME -> BrickKilnBlockEntity.this.litTime; + case DATA_LIT_DURATION -> BrickKilnBlockEntity.this.litDuration; + case DATA_COOKING_PROGRESS -> BrickKilnBlockEntity.this.cookingProgress; + case DATA_COOKING_TOTAL_TIME -> BrickKilnBlockEntity.this.cookingTotalTime; default -> 0; }; } public void set(int key, int value) { switch (key) { - case DATA_LIT_TIME -> BrickFurnaceBlockEntity.this.litTime = value; - case DATA_LIT_DURATION -> BrickFurnaceBlockEntity.this.litDuration = value; - case DATA_COOKING_PROGRESS -> BrickFurnaceBlockEntity.this.cookingProgress = value; - case DATA_COOKING_TOTAL_TIME -> BrickFurnaceBlockEntity.this.cookingTotalTime = value; + case DATA_LIT_TIME -> BrickKilnBlockEntity.this.litTime = value; + case DATA_LIT_DURATION -> BrickKilnBlockEntity.this.litDuration = value; + case DATA_COOKING_PROGRESS -> BrickKilnBlockEntity.this.cookingProgress = value; + case DATA_COOKING_TOTAL_TIME -> BrickKilnBlockEntity.this.cookingTotalTime = value; } } @@ -141,11 +133,11 @@ public int getCount() { private final Object2IntOpenHashMap recipesUsed = new Object2IntOpenHashMap<>(); - public BrickFurnaceBlockEntity(BlockPos blockPos, BlockState blockState) { - super(BlockEntityRegistry.BRICK_FURNACE.get(), blockPos, blockState); + public BrickKilnBlockEntity(BlockPos blockPos, BlockState blockState) { + super(BlockEntityRegistry.BRICK_KILN.get(), blockPos, blockState); } - public static void serverTick(Level pLevel, BlockPos pPos, BlockState pState, BrickFurnaceBlockEntity pBlockEntity){ + public static void serverTick(Level pLevel, BlockPos pPos, BlockState pState, BrickKilnBlockEntity pBlockEntity){ boolean lit = pBlockEntity.isLit(); boolean changed = false; @@ -227,7 +219,7 @@ private boolean canBurn(@Nullable Recipe pRecipe, ItemStack fuel, Ite } } - private boolean burn(Recipe pRecipe, BrickFurnaceBlockEntity entity, ItemStack fuel, ItemStack primary, ItemStack secondary, ItemStack resultPrev, int maxStackSize) { + private boolean burn(Recipe pRecipe, BrickKilnBlockEntity entity, ItemStack fuel, ItemStack primary, ItemStack secondary, ItemStack resultPrev, int maxStackSize) { if (this.canBurn(pRecipe, fuel, primary, secondary, resultPrev, maxStackSize)) { ItemStack newResult = (pRecipe.assemble(new SimpleContainer(primary, secondary))); if (resultPrev.isEmpty()) { @@ -246,7 +238,7 @@ private boolean burn(Recipe pRecipe, BrickFurnaceBlockEntity entity, } } - private static int getTotalCookTime(Level pLevel, BrickFurnaceBlockEntity entity) { + private static int getTotalCookTime(Level pLevel, BrickKilnBlockEntity entity) { return pLevel.getRecipeManager().getRecipeFor(RecipeTypeRegistry.COMPOSITE_SMELTING.get(), wrapRecipe(entity), pLevel).map(CompositeSmeltingRecipe::getCookingTime).orElse(200); } @@ -308,7 +300,7 @@ public Component getDisplayName() { @Nullable @Override public AbstractContainerMenu createMenu(int pContainerId, Inventory pInventory, Player pPlayer) { - return new BrickFurnaceMenu(pContainerId, this.worldPosition, pInventory, + return new BrickKlinMenu(pContainerId, this.worldPosition, pInventory, wrapHandlers(), this.dataAccess); } @@ -316,7 +308,7 @@ public CombinedInvWrapper wrapHandlers(){ return new CombinedInvWrapper(this.ingredientsHandler, this.fuelHandler, this.resultHandler); } - private static RecipeWrapper wrapRecipe(BrickFurnaceBlockEntity entity){ + private static RecipeWrapper wrapRecipe(BrickKilnBlockEntity entity){ return new RecipeWrapper(entity.ingredientsHandler); } diff --git a/src/main/java/com/voxelutopia/ultramarine/world/block/menu/BrickFurnaceMenu.java b/src/main/java/com/voxelutopia/ultramarine/world/block/menu/BrickKlinMenu.java similarity index 80% rename from src/main/java/com/voxelutopia/ultramarine/world/block/menu/BrickFurnaceMenu.java rename to src/main/java/com/voxelutopia/ultramarine/world/block/menu/BrickKlinMenu.java index 5f8a98c7..a3fa7b68 100644 --- a/src/main/java/com/voxelutopia/ultramarine/world/block/menu/BrickFurnaceMenu.java +++ b/src/main/java/com/voxelutopia/ultramarine/world/block/menu/BrickKlinMenu.java @@ -1,21 +1,16 @@ package com.voxelutopia.ultramarine.world.block.menu; -import com.voxelutopia.ultramarine.Ultramarine; -import com.voxelutopia.ultramarine.data.recipe.CompositeSmeltingRecipe; import com.voxelutopia.ultramarine.data.registry.BlockRegistry; import com.voxelutopia.ultramarine.data.registry.MenuTypeRegistry; import com.voxelutopia.ultramarine.data.registry.RecipeTypeRegistry; -import com.voxelutopia.ultramarine.world.block.entity.BrickFurnaceBlockEntity; +import com.voxelutopia.ultramarine.world.block.entity.BrickKilnBlockEntity; import net.minecraft.core.BlockPos; -import net.minecraft.world.Container; import net.minecraft.world.SimpleContainer; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.*; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.AbstractCookingRecipe; import net.minecraft.world.item.crafting.RecipeType; -import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.items.IItemHandler; @@ -23,16 +18,15 @@ import net.minecraftforge.items.SlotItemHandler; import net.minecraftforge.items.wrapper.InvWrapper; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import javax.annotation.Nonnull; -public class BrickFurnaceMenu extends AbstractContainerMenu { +public class BrickKlinMenu extends AbstractContainerMenu { - public static final int SLOT_INPUT_PRIMARY = BrickFurnaceBlockEntity.SLOT_INPUT_PRIMARY; //0 - public static final int SLOT_INPUT_SECONDARY = BrickFurnaceBlockEntity.SLOT_INPUT_SECONDARY; //1 - public static final int SLOT_FUEL = BrickFurnaceBlockEntity.SLOT_FUEL; //2 - public static final int SLOT_RESULT = BrickFurnaceBlockEntity.SLOT_RESULT; //3 + public static final int SLOT_INPUT_PRIMARY = BrickKilnBlockEntity.SLOT_INPUT_PRIMARY; //0 + public static final int SLOT_INPUT_SECONDARY = BrickKilnBlockEntity.SLOT_INPUT_SECONDARY; //1 + public static final int SLOT_FUEL = BrickKilnBlockEntity.SLOT_FUEL; //2 + public static final int SLOT_RESULT = BrickKilnBlockEntity.SLOT_RESULT; //3 private static final int INV_SLOT_START = 4; private static final int INV_SLOT_END = 31; private static final int USE_ROW_SLOT_START = 31; @@ -43,12 +37,12 @@ public class BrickFurnaceMenu extends AbstractContainerMenu { private final IItemHandler inventory; private final ContainerData data; - public BrickFurnaceMenu(int pId, BlockPos pos, Inventory inventory) { + public BrickKlinMenu(int pId, BlockPos pos, Inventory inventory) { this(pId, pos, inventory, new ItemStackHandler(4), new SimpleContainerData(4)); } - public BrickFurnaceMenu(int id, BlockPos pos, Inventory inventory, IItemHandler container, ContainerData containerData){ - super(MenuTypeRegistry.BRICK_FURNACE.get(), id); + public BrickKlinMenu(int id, BlockPos pos, Inventory inventory, IItemHandler container, ContainerData containerData){ + super(MenuTypeRegistry.BRICK_KILN.get(), id); this.playerEntity = inventory.player; this.blockEntity = playerEntity.getCommandSenderWorld().getBlockEntity(pos); this.storage = container; @@ -128,26 +122,26 @@ protected boolean canProcess(ItemStack item) { @Override public boolean stillValid(Player pPlayer) { - return stillValid(ContainerLevelAccess.create(blockEntity.getLevel(), blockEntity.getBlockPos()), playerEntity, BlockRegistry.BRICK_FURNACE.get()); + return stillValid(ContainerLevelAccess.create(blockEntity.getLevel(), blockEntity.getBlockPos()), playerEntity, BlockRegistry.BRICK_KILN.get()); } public boolean isLit() { - return this.data.get(BrickFurnaceBlockEntity.DATA_LIT_TIME) > 0; + return this.data.get(BrickKilnBlockEntity.DATA_LIT_TIME) > 0; } public int getBurnProgress() { - int i = this.data.get(BrickFurnaceBlockEntity.DATA_COOKING_PROGRESS); - int j = this.data.get(BrickFurnaceBlockEntity.DATA_COOKING_TOTAL_TIME); + int i = this.data.get(BrickKilnBlockEntity.DATA_COOKING_PROGRESS); + int j = this.data.get(BrickKilnBlockEntity.DATA_COOKING_TOTAL_TIME); return j != 0 && i != 0 ? i * 24 / j : 0; } public int getLitProgress() { - int i = this.data.get(BrickFurnaceBlockEntity.DATA_LIT_DURATION); + int i = this.data.get(BrickKilnBlockEntity.DATA_LIT_DURATION); if (i == 0) { i = 200; } - return this.data.get(BrickFurnaceBlockEntity.DATA_LIT_TIME) * 13 / i; + return this.data.get(BrickKilnBlockEntity.DATA_LIT_TIME) * 13 / i; } static class OutputSlot extends SlotItemHandler { diff --git a/src/main/resources/assets/ultramarine/lang/en_us.json b/src/main/resources/assets/ultramarine/lang/en_us.json index 2ceb4e88..8517ff41 100644 --- a/src/main/resources/assets/ultramarine/lang/en_us.json +++ b/src/main/resources/assets/ultramarine/lang/en_us.json @@ -437,6 +437,7 @@ "__comment9__": "Functional Blocks", "block.ultramarine.woodworking_workbench": "Woodworking Workbench", + "block.ultramarine.brick_kiln": "Brick Kiln", "__comment10__": "Resource Blocks", "block.ultramarine.jade_ore": "Jade Ore", @@ -549,6 +550,7 @@ "container.ebony_cabinet": "Ebony Cabinet", "container.woodworking_workbench": "Woodworking Workbench", + "container.brick_kiln": "Brick Kiln", "__comment22__": "Entity", "entity.ultramarine.seat": "Seat", diff --git a/src/main/resources/assets/ultramarine/lang/zh_cn.json b/src/main/resources/assets/ultramarine/lang/zh_cn.json index bf14e1bc..52de6049 100644 --- a/src/main/resources/assets/ultramarine/lang/zh_cn.json +++ b/src/main/resources/assets/ultramarine/lang/zh_cn.json @@ -436,6 +436,7 @@ "__comment9__": "Functional Blocks", "block.ultramarine.woodworking_workbench": "木工桌", + "block.ultramarine.brick_kiln": "砖窑", "__comment10__": "Resource Blocks", "block.ultramarine.jade_ore": "玉矿石", @@ -548,6 +549,7 @@ "container.ebony_cabinet": "乌木橱柜", "container.woodworking_workbench": "木工桌", + "container.brick_kiln": "砖窑", "__comment22__": "Entity", "entity.ultramarine.seat": "座位", diff --git a/src/main/resources/assets/ultramarine/textures/block/brick_furnace.png b/src/main/resources/assets/ultramarine/textures/block/brick_kiln.png similarity index 100% rename from src/main/resources/assets/ultramarine/textures/block/brick_furnace.png rename to src/main/resources/assets/ultramarine/textures/block/brick_kiln.png diff --git a/src/main/resources/assets/ultramarine/textures/gui/brick_furnace.png b/src/main/resources/assets/ultramarine/textures/gui/brick_kiln.png similarity index 100% rename from src/main/resources/assets/ultramarine/textures/gui/brick_furnace.png rename to src/main/resources/assets/ultramarine/textures/gui/brick_kiln.png