Skip to content

Commit

Permalink
💥 renamed brick_furnace to brick_kiln
Browse files Browse the repository at this point in the history
Signed-off-by: LocusAzzurro <[email protected]>
  • Loading branch information
LocusAzzurro committed Jan 7, 2024
1 parent bed71e6 commit a8ae8af
Show file tree
Hide file tree
Showing 23 changed files with 82 additions and 104 deletions.
10 changes: 5 additions & 5 deletions src/generated/resources/.cache/cache
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "ultramarine:block/brick_kiln"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "ultramarine:block/brick_furnace"
"all": "ultramarine:block/brick_kiln"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "ultramarine:block/brick_kiln"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@
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;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Inventory;

public class BrickFurnaceScreen extends AbstractContainerScreen<BrickFurnaceMenu> {
public class BrickKilnScreen extends AbstractContainerScreen<BrickKlinMenu> {

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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -17,8 +17,6 @@
import net.minecraftforge.registries.ForgeRegistries;
import org.jetbrains.annotations.Nullable;

import java.util.stream.Stream;

public class CompositeSmeltingRecipe implements Recipe<Container> {

protected final ResourceLocation id;
Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<BlockEntityType<BrickFurnaceBlockEntity>>
BRICK_FURNACE = BLOCK_ENTITIES.register(
"brick_furnace_block_entity", () -> BlockEntityType.Builder
.of(BrickFurnaceBlockEntity::new, BlockRegistry.BRICK_FURNACE.get()).build(null));
public static final RegistryObject<BlockEntityType<BrickKilnBlockEntity>>
BRICK_KILN = BLOCK_ENTITIES.register(
"brick_kiln_block_entity", () -> BlockEntityType.Builder
.of(BrickKilnBlockEntity::new, BlockRegistry.BRICK_KILN.get()).build(null));

}
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ public class BlockRegistry {
*/

public static final RegistryObject<Block> WOODWORKING_WORKBENCH = BLOCKS.register("woodworking_workbench", WoodworkingWorkBench::new);
public static final RegistryObject<Block> BRICK_FURNACE = BLOCKS.register("brick_furnace", BrickFurnace::new);
public static final RegistryObject<Block> BRICK_KILN = BLOCKS.register("brick_kiln", BrickKiln::new);

private static RegistryObject<Block> simpleBlock(String name, Material material) {
return BLOCKS.register(name, () -> new Block(BlockBehaviour.Properties.of(material)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ public class ItemRegistry {

public static final RegistryObject<Item> WOODEN_MALLET = ITEMS.register("wooden_mallet", WoodenMallet::new);
public static final RegistryObject<Item> WOODWORKING_WORKBENCH = fromBlock(BlockRegistry.WOODWORKING_WORKBENCH, ModCreativeTab.TOOLS);
public static final RegistryObject<Item> BRICK_FURNACE = fromBlock(BlockRegistry.BRICK_FURNACE, ModCreativeTab.TOOLS);
public static final RegistryObject<Item> BRICK_FURNACE = fromBlock(BlockRegistry.BRICK_KILN, ModCreativeTab.TOOLS);

private static <B extends Block> RegistryObject<Item> fromBlock(RegistryObject<B> block, ModCreativeTab tabDef) {
RegistryObject<Item> registryObject = ITEMS.register(block.getId().getPath(), () -> new BlockItem(block.get(), new Item.Properties().tab(tabDef.getTab())));
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -26,7 +26,7 @@ public class MenuTypeRegistry {
() -> IForgeMenuType.create((windowId, inv, data) -> ContainerDecorativeBlockMenu.foodSixRows(windowId, inv)));
public static final RegistryObject<MenuType<WoodworkingWorkbenchMenu>> WOODWORKING_WORKBENCH = MENU_TYPES.register("woodworking_workbench",
() -> IForgeMenuType.create((windowId, inv, data) -> new WoodworkingWorkbenchMenu(windowId, inv)));
public static final RegistryObject<MenuType<BrickFurnaceMenu>> BRICK_FURNACE = MENU_TYPES.register("brick_furnace",
() -> IForgeMenuType.create((windowId, inv, data) -> new BrickFurnaceMenu(windowId, data.readBlockPos(), inv)));
public static final RegistryObject<MenuType<BrickKlinMenu>> BRICK_KILN = MENU_TYPES.register("brick_kiln",
() -> IForgeMenuType.create((windowId, inv, data) -> new BrickKlinMenu(windowId, data.readBlockPos(), inv)));

}
Original file line number Diff line number Diff line change
@@ -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.*;
Expand Down Expand Up @@ -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){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -30,31 +23,30 @@
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));
}

@Nullable
@Override
public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) {
return new BrickFurnaceBlockEntity(pPos, pState);
return new BrickKilnBlockEntity(pPos, pState);
}

@Nullable
@Override
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level pLevel, BlockState pState, BlockEntityType<T> pBlockEntityType) {
return pLevel.isClientSide ? null :
BlockEntityHelper.createTickerHelper(pBlockEntityType, (BlockEntityType<? extends BrickFurnaceBlockEntity>) BlockEntityRegistry.BRICK_FURNACE.get(), BrickFurnaceBlockEntity::serverTick);
BlockEntityHelper.createTickerHelper(pBlockEntityType, (BlockEntityType<? extends BrickKilnBlockEntity>) BlockEntityRegistry.BRICK_KILN.get(), BrickKilnBlockEntity::serverTick);
}

@Override
Expand All @@ -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;
}
Expand All @@ -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(
Expand Down
Loading

0 comments on commit a8ae8af

Please sign in to comment.