From bb39ff4f846d30e4bb110804c68e9befed71cffd Mon Sep 17 00:00:00 2001 From: Mikhail Oleynikov Date: Sun, 28 Jul 2019 14:54:45 +0300 Subject: [PATCH] Rename Coal Generator to Sterling Generator --- .../AbstractTieredMachineBlockEntity.java | 13 ------------- .../api/block/entity/ITieredBlockEntity.java | 16 +++++++++++++++- .../java/vivatech/client/VivatechClient.java | 2 +- .../client/screen/CoalGeneratorScreen.java | 4 ++-- src/main/java/vivatech/common/Vivatech.java | 2 +- ...rBlock.java => SterlingGeneratorBlock.java} | 10 +++++----- .../block/entity/CrusherBlockEntity.java | 16 +++++++++++++--- .../common/block/entity/PressBlockEntity.java | 17 ++++++++++++++--- ....java => SterlingGeneratorBlockEntity.java} | 4 ++-- .../vivatech/common/init/VivatechBlocks.java | 8 ++++---- .../vivatech/common/init/VivatechEntities.java | 10 +++++----- .../vivatech/common/init/VivatechItems.java | 5 ++--- .../vivatech/blockstates/coal_generator.json | 12 ------------ .../blockstates/sterling_generator.json | 12 ++++++++++++ .../resources/assets/vivatech/lang/en_us.json | 4 ++-- .../resources/assets/vivatech/lang/ru_ru.json | 4 ++-- .../models/block/coal_generator_active.json | 6 ------ ..._generator.json => sterling_generator.json} | 2 +- .../block/sterling_generator_active.json | 6 ++++++ .../vivatech/models/item/coal_generator.json | 3 --- .../models/item/sterling_generator.json | 3 +++ ...png => sterling_generator_active_front.png} | Bin ..._front.png => sterling_generator_front.png} | Bin ..._generator.json => sterling_generator.json} | 2 +- ..._generator.json => sterling_generator.json} | 2 +- 25 files changed, 92 insertions(+), 71 deletions(-) rename src/main/java/vivatech/common/block/{CoalGeneratorBlock.java => SterlingGeneratorBlock.java} (81%) rename src/main/java/vivatech/common/block/entity/{CoalGeneratorBlockEntity.java => SterlingGeneratorBlockEntity.java} (97%) delete mode 100644 src/main/resources/assets/vivatech/blockstates/coal_generator.json create mode 100644 src/main/resources/assets/vivatech/blockstates/sterling_generator.json delete mode 100644 src/main/resources/assets/vivatech/models/block/coal_generator_active.json rename src/main/resources/assets/vivatech/models/block/{coal_generator.json => sterling_generator.json} (58%) create mode 100644 src/main/resources/assets/vivatech/models/block/sterling_generator_active.json delete mode 100644 src/main/resources/assets/vivatech/models/item/coal_generator.json create mode 100644 src/main/resources/assets/vivatech/models/item/sterling_generator.json rename src/main/resources/assets/vivatech/textures/block/{coal_generator_active_front.png => sterling_generator_active_front.png} (100%) rename src/main/resources/assets/vivatech/textures/block/{coal_generator_front.png => sterling_generator_front.png} (100%) rename src/main/resources/data/vivatech/loot_tables/blocks/{coal_generator.json => sterling_generator.json} (84%) rename src/main/resources/data/vivatech/recipes/{coal_generator.json => sterling_generator.json} (89%) diff --git a/src/main/java/vivatech/api/block/entity/AbstractTieredMachineBlockEntity.java b/src/main/java/vivatech/api/block/entity/AbstractTieredMachineBlockEntity.java index 98121e1..03d1e1c 100644 --- a/src/main/java/vivatech/api/block/entity/AbstractTieredMachineBlockEntity.java +++ b/src/main/java/vivatech/api/block/entity/AbstractTieredMachineBlockEntity.java @@ -1,22 +1,9 @@ package vivatech.api.block.entity; -import net.minecraft.block.Block; import net.minecraft.block.entity.BlockEntityType; -import vivatech.api.block.ITieredBlock; -import vivatech.api.util.BlockTier; public abstract class AbstractTieredMachineBlockEntity extends AbstractMachineBlockEntity implements ITieredBlockEntity { public AbstractTieredMachineBlockEntity(BlockEntityType type) { super(type); } - - @Override - public BlockTier getTier() { - Block block = world.getBlockState(pos).getBlock(); - if (block instanceof ITieredBlock) { - return ((ITieredBlock) block).getTier(); - } else { - return BlockTier.MINIMAL; - } - } } diff --git a/src/main/java/vivatech/api/block/entity/ITieredBlockEntity.java b/src/main/java/vivatech/api/block/entity/ITieredBlockEntity.java index 0bd248f..1913aa0 100644 --- a/src/main/java/vivatech/api/block/entity/ITieredBlockEntity.java +++ b/src/main/java/vivatech/api/block/entity/ITieredBlockEntity.java @@ -1,7 +1,21 @@ package vivatech.api.block.entity; +import net.minecraft.block.Block; +import net.minecraft.block.entity.BlockEntity; +import vivatech.api.block.ITieredBlock; import vivatech.api.util.BlockTier; +/** + * WARNING: Only apply on BlockEntity! + */ public interface ITieredBlockEntity { - BlockTier getTier(); + default BlockTier getTier() { + BlockEntity self = (BlockEntity) this; + Block block = self.getWorld().getBlockState(self.getPos()).getBlock(); + if (block instanceof ITieredBlock) { + return ((ITieredBlock) block).getTier(); + } else { + return BlockTier.MINIMAL; + } + }; } diff --git a/src/main/java/vivatech/client/VivatechClient.java b/src/main/java/vivatech/client/VivatechClient.java index 40189ec..306a417 100644 --- a/src/main/java/vivatech/client/VivatechClient.java +++ b/src/main/java/vivatech/client/VivatechClient.java @@ -21,7 +21,7 @@ public class VivatechClient implements ClientModInitializer { @Override public void onInitializeClient() { - ScreenProviderRegistry.INSTANCE.registerFactory(CoalGeneratorBlock.ID, (syncId, identifier, player, buf) -> + ScreenProviderRegistry.INSTANCE.registerFactory(SterlingGeneratorBlock.ID, (syncId, identifier, player, buf) -> new CoalGeneratorScreen(new CoalGeneratorMenu( syncId, player.inventory, BlockContext.create(player.world, buf.readBlockPos())), player)); ScreenProviderRegistry.INSTANCE.registerFactory(CrusherBlock.ID, (syncId, identifier, player, buf) -> diff --git a/src/main/java/vivatech/client/screen/CoalGeneratorScreen.java b/src/main/java/vivatech/client/screen/CoalGeneratorScreen.java index 0fd8422..ed9b206 100644 --- a/src/main/java/vivatech/client/screen/CoalGeneratorScreen.java +++ b/src/main/java/vivatech/client/screen/CoalGeneratorScreen.java @@ -3,7 +3,7 @@ import io.github.cottonmc.cotton.gui.client.CottonScreen; import io.github.cottonmc.cotton.gui.widget.WLabel; import net.minecraft.entity.player.PlayerEntity; -import vivatech.common.block.CoalGeneratorBlock; +import vivatech.common.block.SterlingGeneratorBlock; import vivatech.common.menu.CoalGeneratorMenu; import vivatech.util.StringHelper; @@ -17,7 +17,7 @@ protected void drawBackground(float partialTicks, int mouseX, int mouseY) { super.drawBackground(partialTicks, mouseX, mouseY); // Title - String title = StringHelper.getTranslatableComponent("block", CoalGeneratorBlock.ID).asString(); + String title = StringHelper.getTranslatableComponent("block", SterlingGeneratorBlock.ID).asString(); font.draw(title, left + 81 - font.getStringWidth(title) / 2, top, WLabel.DEFAULT_TEXT_COLOR); } } diff --git a/src/main/java/vivatech/common/Vivatech.java b/src/main/java/vivatech/common/Vivatech.java index 733663b..e938d79 100644 --- a/src/main/java/vivatech/common/Vivatech.java +++ b/src/main/java/vivatech/common/Vivatech.java @@ -48,7 +48,7 @@ public void onInitialize() { VivatechEntities.initialize(); VivatechItems.initialize(); - ContainerProviderRegistry.INSTANCE.registerFactory(CoalGeneratorBlock.ID, (syncId, id, player, buf) -> + ContainerProviderRegistry.INSTANCE.registerFactory(SterlingGeneratorBlock.ID, (syncId, id, player, buf) -> new CoalGeneratorMenu(syncId, player.inventory, BlockContext.create(player.world, buf.readBlockPos()))); ContainerProviderRegistry.INSTANCE.registerFactory(CrusherBlock.ID, (syncId, id, player, buf) -> new CrusherMenu(syncId, player.inventory, BlockContext.create(player.world, buf.readBlockPos()))); diff --git a/src/main/java/vivatech/common/block/CoalGeneratorBlock.java b/src/main/java/vivatech/common/block/SterlingGeneratorBlock.java similarity index 81% rename from src/main/java/vivatech/common/block/CoalGeneratorBlock.java rename to src/main/java/vivatech/common/block/SterlingGeneratorBlock.java index 009836c..b47e1f4 100644 --- a/src/main/java/vivatech/common/block/CoalGeneratorBlock.java +++ b/src/main/java/vivatech/common/block/SterlingGeneratorBlock.java @@ -12,12 +12,12 @@ import net.minecraft.world.World; import vivatech.common.Vivatech; import vivatech.api.block.AbstractMachineBlock; -import vivatech.common.block.entity.CoalGeneratorBlockEntity; +import vivatech.common.block.entity.SterlingGeneratorBlockEntity; -public class CoalGeneratorBlock extends AbstractMachineBlock { - public static final Identifier ID = new Identifier(Vivatech.MODID, "coal_generator"); +public class SterlingGeneratorBlock extends AbstractMachineBlock { + public static final Identifier ID = new Identifier(Vivatech.MODID, "sterling_generator"); - public CoalGeneratorBlock() { + public SterlingGeneratorBlock() { super(Vivatech.MACHINE_BLOCK_SETTINGS); } @@ -34,6 +34,6 @@ public boolean activate(BlockState state, World world, BlockPos pos, PlayerEntit // BlockEntityProvider @Override public BlockEntity createBlockEntity(BlockView blockView) { - return new CoalGeneratorBlockEntity(); + return new SterlingGeneratorBlockEntity(); } } diff --git a/src/main/java/vivatech/common/block/entity/CrusherBlockEntity.java b/src/main/java/vivatech/common/block/entity/CrusherBlockEntity.java index f4aa53a..e89b249 100644 --- a/src/main/java/vivatech/common/block/entity/CrusherBlockEntity.java +++ b/src/main/java/vivatech/common/block/entity/CrusherBlockEntity.java @@ -105,6 +105,15 @@ protected void serverTick() { } } + public ItemStack getInputStack() { + if (!inventory.get(0).isEmpty()) { + CrushingRecipe recipe = world.getRecipeManager().getFirstMatch(VivatechRecipes.CRUSHING, this, world).orElse(null); + return recipe != null ? recipe.getInput().getStackArray()[0].copy() : ItemStack.EMPTY; + } + + return ItemStack.EMPTY; + } + public ItemStack getOutputStack() { if (!inventory.get(0).isEmpty()) { CrushingRecipe recipe = world.getRecipeManager().getFirstMatch(VivatechRecipes.CRUSHING, this, world).orElse(null); @@ -129,15 +138,16 @@ public boolean canRun() { } public void crushItem() { + ItemStack input = getInputStack(); ItemStack output = getOutputStack(); - if (!output.isEmpty()) { + if (!output.isEmpty() && !input.isEmpty()) { if (inventory.get(1).isEmpty()) { inventory.set(1, output); } else { - inventory.get(1).increment(1); + inventory.get(1).increment(output.getCount()); } - inventory.get(0).decrement(1); + inventory.get(0).decrement(input.getCount()); } } diff --git a/src/main/java/vivatech/common/block/entity/PressBlockEntity.java b/src/main/java/vivatech/common/block/entity/PressBlockEntity.java index 2194a21..356c6f4 100644 --- a/src/main/java/vivatech/common/block/entity/PressBlockEntity.java +++ b/src/main/java/vivatech/common/block/entity/PressBlockEntity.java @@ -105,6 +105,16 @@ protected void serverTick() { } } + public ItemStack getInputStack() { + if (!inventory.get(0).isEmpty()) { + PressingRecipe recipe = world.getRecipeManager().getFirstMatch(VivatechRecipes.PRESSING, this, world).orElse(null); + return recipe != null ? recipe.getInput().getStackArray()[0].copy() : ItemStack.EMPTY; + } + + return ItemStack.EMPTY; + } + + public ItemStack getOutputStack() { if (!inventory.get(0).isEmpty()) { PressingRecipe recipe = world.getRecipeManager().getFirstMatch(VivatechRecipes.PRESSING, this, world).orElse(null); @@ -129,15 +139,16 @@ public boolean canRun() { } public void pressItem() { + ItemStack input = getInputStack(); ItemStack output = getOutputStack(); - if (!output.isEmpty()) { + if (!output.isEmpty() && !input.isEmpty()) { if (inventory.get(1).isEmpty()) { inventory.set(1, output); } else { - inventory.get(1).increment(1); + inventory.get(1).increment(output.getCount()); } - inventory.get(0).decrement(1); + inventory.get(0).decrement(input.getCount()); } } diff --git a/src/main/java/vivatech/common/block/entity/CoalGeneratorBlockEntity.java b/src/main/java/vivatech/common/block/entity/SterlingGeneratorBlockEntity.java similarity index 97% rename from src/main/java/vivatech/common/block/entity/CoalGeneratorBlockEntity.java rename to src/main/java/vivatech/common/block/entity/SterlingGeneratorBlockEntity.java index 077ebb4..75e0768 100644 --- a/src/main/java/vivatech/common/block/entity/CoalGeneratorBlockEntity.java +++ b/src/main/java/vivatech/common/block/entity/SterlingGeneratorBlockEntity.java @@ -14,7 +14,7 @@ import javax.annotation.Nullable; -public class CoalGeneratorBlockEntity extends AbstractMachineBlockEntity { +public class SterlingGeneratorBlockEntity extends AbstractMachineBlockEntity { private static final int GENERATE_PER_TICK = 1; private static final int TICK_PER_GENERATE = 5; private int burnTime = 0; @@ -63,7 +63,7 @@ public int size() { }; - public CoalGeneratorBlockEntity() { + public SterlingGeneratorBlockEntity() { super(VivatechEntities.COAL_GENERATOR); } diff --git a/src/main/java/vivatech/common/init/VivatechBlocks.java b/src/main/java/vivatech/common/init/VivatechBlocks.java index de2399c..f12374a 100644 --- a/src/main/java/vivatech/common/init/VivatechBlocks.java +++ b/src/main/java/vivatech/common/init/VivatechBlocks.java @@ -8,7 +8,7 @@ import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; import vivatech.common.Vivatech; -import vivatech.common.block.CoalGeneratorBlock; +import vivatech.common.block.SterlingGeneratorBlock; import vivatech.common.block.CrusherBlock; import vivatech.common.block.ElectricFurnaceBlock; import vivatech.common.block.EnergyBankBlock; @@ -24,7 +24,7 @@ public class VivatechBlocks { public static final Block MINIMAL_MACHINE_CHASSIS; public static final Block NORMAL_MACHINE_CHASSIS; public static final Block ADVANCED_MACHINE_CHASSIS; - public static final CoalGeneratorBlock COAL_GENERATOR; + public static final SterlingGeneratorBlock COAL_GENERATOR; public static final EnergyBankBlock ENERGY_BANK; public static final ImmutableList CRUSHER; @@ -36,7 +36,7 @@ public class VivatechBlocks { MINIMAL_MACHINE_CHASSIS = new Block(FabricBlockSettings.copy(Blocks.STONE).build()); NORMAL_MACHINE_CHASSIS = new Block(FabricBlockSettings.copy(Blocks.IRON_BLOCK).build()); ADVANCED_MACHINE_CHASSIS = new Block(FabricBlockSettings.copy(Blocks.IRON_BLOCK).hardness(7f).resistance(10f).build()); - COAL_GENERATOR = new CoalGeneratorBlock(); + COAL_GENERATOR = new SterlingGeneratorBlock(); ENERGY_BANK = new EnergyBankBlock(); CRUSHER = TierHelper.fillTieredBlockArray(CrusherBlock::new); @@ -49,7 +49,7 @@ public static void initialize() { Registry.register(Registry.BLOCK, MINIMAL_MACHINE_CHASSIS_ID, MINIMAL_MACHINE_CHASSIS); Registry.register(Registry.BLOCK, NORMAL_MACHINE_CHASSIS_ID, NORMAL_MACHINE_CHASSIS); Registry.register(Registry.BLOCK, ADVANCED_MACHINE_CHASSIS_ID, ADVANCED_MACHINE_CHASSIS); - Registry.register(Registry.BLOCK, CoalGeneratorBlock.ID, COAL_GENERATOR); + Registry.register(Registry.BLOCK, SterlingGeneratorBlock.ID, COAL_GENERATOR); Registry.register(Registry.BLOCK, EnergyBankBlock.ID, ENERGY_BANK); TierHelper.registerTieredBlocks(CRUSHER); TierHelper.registerTieredBlocks(ELECTRIC_FURNACE); diff --git a/src/main/java/vivatech/common/init/VivatechEntities.java b/src/main/java/vivatech/common/init/VivatechEntities.java index 0016444..7f9d005 100644 --- a/src/main/java/vivatech/common/init/VivatechEntities.java +++ b/src/main/java/vivatech/common/init/VivatechEntities.java @@ -3,13 +3,13 @@ import net.minecraft.block.Block; import net.minecraft.block.entity.BlockEntityType; import net.minecraft.util.registry.Registry; -import vivatech.common.block.CoalGeneratorBlock; +import vivatech.common.block.SterlingGeneratorBlock; import vivatech.common.block.CrusherBlock; import vivatech.common.block.ElectricFurnaceBlock; import vivatech.common.block.EnergyBankBlock; import vivatech.common.block.EnergyConduitBlock; import vivatech.common.block.PressBlock; -import vivatech.common.block.entity.CoalGeneratorBlockEntity; +import vivatech.common.block.entity.SterlingGeneratorBlockEntity; import vivatech.common.block.entity.CrusherBlockEntity; import vivatech.common.block.entity.ElectricFurnaceBlockEntity; import vivatech.common.block.entity.EnergyBankBlockEntity; @@ -18,7 +18,7 @@ import vivatech.api.util.BlockTier; public class VivatechEntities { - public static final BlockEntityType COAL_GENERATOR; + public static final BlockEntityType COAL_GENERATOR; public static final BlockEntityType CRUSHER; public static final BlockEntityType ELECTRIC_FURNACE; public static final BlockEntityType ENERGY_BANK; @@ -26,7 +26,7 @@ public class VivatechEntities { public static final BlockEntityType PRESS; static { - COAL_GENERATOR = BlockEntityType.Builder.create(CoalGeneratorBlockEntity::new, + COAL_GENERATOR = BlockEntityType.Builder.create(SterlingGeneratorBlockEntity::new, VivatechBlocks.COAL_GENERATOR).build(null); CRUSHER = BlockEntityType.Builder.create(CrusherBlockEntity::new, VivatechBlocks.CRUSHER.toArray(new Block[BlockTier.values().length])).build(null); @@ -41,7 +41,7 @@ public class VivatechEntities { } public static void initialize() { - Registry.register(Registry.BLOCK_ENTITY, CoalGeneratorBlock.ID, COAL_GENERATOR); + Registry.register(Registry.BLOCK_ENTITY, SterlingGeneratorBlock.ID, COAL_GENERATOR); Registry.register(Registry.BLOCK_ENTITY, CrusherBlock.ID, CRUSHER); Registry.register(Registry.BLOCK_ENTITY, ElectricFurnaceBlock.ID, ELECTRIC_FURNACE); Registry.register(Registry.BLOCK_ENTITY, EnergyBankBlock.ID, ENERGY_BANK); diff --git a/src/main/java/vivatech/common/init/VivatechItems.java b/src/main/java/vivatech/common/init/VivatechItems.java index 703929e..7205d87 100644 --- a/src/main/java/vivatech/common/init/VivatechItems.java +++ b/src/main/java/vivatech/common/init/VivatechItems.java @@ -4,9 +4,8 @@ import net.minecraft.item.Item; import net.minecraft.util.registry.Registry; import vivatech.common.Vivatech; -import vivatech.common.block.CoalGeneratorBlock; +import vivatech.common.block.SterlingGeneratorBlock; import vivatech.common.block.EnergyBankBlock; -import vivatech.common.block.EnergyConduitBlock; import vivatech.common.item.BatteryItem; import vivatech.common.item.ScrewdriverItem; import vivatech.util.TierHelper; @@ -46,7 +45,7 @@ public static void initialize() { Registry.register(Registry.ITEM, VivatechBlocks.MINIMAL_MACHINE_CHASSIS_ID, MINIMAL_MACHINE_CHASSIS); Registry.register(Registry.ITEM, VivatechBlocks.NORMAL_MACHINE_CHASSIS_ID, NORMAL_MACHINE_CHASSIS); Registry.register(Registry.ITEM, VivatechBlocks.ADVANCED_MACHINE_CHASSIS_ID, ADVANCED_MACHINE_CHASSIS); - Registry.register(Registry.ITEM, CoalGeneratorBlock.ID, COAL_GENERATOR); + Registry.register(Registry.ITEM, SterlingGeneratorBlock.ID, COAL_GENERATOR); Registry.register(Registry.ITEM, EnergyBankBlock.ID, ENERGY_BANK); TierHelper.registerTieredBlockItems(VivatechBlocks.CRUSHER, CRUSHER); diff --git a/src/main/resources/assets/vivatech/blockstates/coal_generator.json b/src/main/resources/assets/vivatech/blockstates/coal_generator.json deleted file mode 100644 index d9e6989..0000000 --- a/src/main/resources/assets/vivatech/blockstates/coal_generator.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "variants": { - "facing=north,active=false": { "model": "vivatech:block/coal_generator" }, - "facing=east,active=false": { "model": "vivatech:block/coal_generator", "y": 90 }, - "facing=south,active=false": { "model": "vivatech:block/coal_generator", "y": 180 }, - "facing=west,active=false": { "model": "vivatech:block/coal_generator", "y": 270 }, - "facing=north,active=true": { "model": "vivatech:block/coal_generator_active" }, - "facing=east,active=true": { "model": "vivatech:block/coal_generator_active", "y": 90 }, - "facing=south,active=true": { "model": "vivatech:block/coal_generator_active", "y": 180 }, - "facing=west,active=true": { "model": "vivatech:block/coal_generator_active", "y": 270 } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/vivatech/blockstates/sterling_generator.json b/src/main/resources/assets/vivatech/blockstates/sterling_generator.json new file mode 100644 index 0000000..afaac3e --- /dev/null +++ b/src/main/resources/assets/vivatech/blockstates/sterling_generator.json @@ -0,0 +1,12 @@ +{ + "variants": { + "facing=north,active=false": { "model": "vivatech:block/sterling_generator" }, + "facing=east,active=false": { "model": "vivatech:block/sterling_generator", "y": 90 }, + "facing=south,active=false": { "model": "vivatech:block/sterling_generator", "y": 180 }, + "facing=west,active=false": { "model": "vivatech:block/sterling_generator", "y": 270 }, + "facing=north,active=true": { "model": "vivatech:block/sterling_generator_active" }, + "facing=east,active=true": { "model": "vivatech:block/sterling_generator_active", "y": 90 }, + "facing=south,active=true": { "model": "vivatech:block/sterling_generator_active", "y": 180 }, + "facing=west,active=true": { "model": "vivatech:block/sterling_generator_active", "y": 270 } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/vivatech/lang/en_us.json b/src/main/resources/assets/vivatech/lang/en_us.json index e538fea..8fc570e 100644 --- a/src/main/resources/assets/vivatech/lang/en_us.json +++ b/src/main/resources/assets/vivatech/lang/en_us.json @@ -4,14 +4,14 @@ "block.vivatech.minimal_machine_chassis": "Minimal Machine Chassis", "block.vivatech.normal_machine_chassis": "Normal Machine Chassis", "block.vivatech.advanced_machine_chassis": "Advanced Machine Chassis", - - "block.vivatech.coal_generator": "Coal Generator", + "block.vivatech.crusher": "Crusher", "block.vivatech.cutter": "Cutter", "block.vivatech.electric_furnace": "Electric Furnace", "block.vivatech.energy_bank": "Energy Bank", "block.vivatech.energy_conduit": "Energy Conduit", "block.vivatech.press": "Press", + "block.vivatech.sterling_generator": "Sterling Generator", "item.vivatech.battery": "Battery", "item.vivatech.screwdriver": "Screwdriver", diff --git a/src/main/resources/assets/vivatech/lang/ru_ru.json b/src/main/resources/assets/vivatech/lang/ru_ru.json index b3b5fd1..a046478 100644 --- a/src/main/resources/assets/vivatech/lang/ru_ru.json +++ b/src/main/resources/assets/vivatech/lang/ru_ru.json @@ -4,14 +4,14 @@ "block.vivatech.minimal_machine_chassis": "Минимальный Корпус Машины", "block.vivatech.normal_machine_chassis": "Обычный Корпус Машины", "block.vivatech.advanced_machine_chassis": "Продвинутый Корпус Машины", - - "block.vivatech.coal_generator": "Угольный Генератор", + "block.vivatech.crusher": "Дробитель", "block.vivatech.cutter": "Резчик", "block.vivatech.electric_furnace": "Электропечь", "block.vivatech.energy_bank": "Энергохранилище", "block.vivatech.energy_conduit": "Минимальная Труба для Энергии", "block.vivatech.press": "Пресс", + "block.vivatech.sterling_generator": "Генератор Стерлинга", "item.vivatech.battery": "Батарея", "item.vivatech.screwdriver": "Отвёртка", diff --git a/src/main/resources/assets/vivatech/models/block/coal_generator_active.json b/src/main/resources/assets/vivatech/models/block/coal_generator_active.json deleted file mode 100644 index 7390c53..0000000 --- a/src/main/resources/assets/vivatech/models/block/coal_generator_active.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "vivatech:block/coal_generator", - "textures": { - "front": "vivatech:block/coal_generator_active_front" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/vivatech/models/block/coal_generator.json b/src/main/resources/assets/vivatech/models/block/sterling_generator.json similarity index 58% rename from src/main/resources/assets/vivatech/models/block/coal_generator.json rename to src/main/resources/assets/vivatech/models/block/sterling_generator.json index eeb9431..864b471 100644 --- a/src/main/resources/assets/vivatech/models/block/coal_generator.json +++ b/src/main/resources/assets/vivatech/models/block/sterling_generator.json @@ -1,6 +1,6 @@ { "parent": "vivatech:block/normal_machine_chassis", "textures": { - "front": "vivatech:block/coal_generator_front" + "front": "vivatech:block/sterling_generator_front" } } \ No newline at end of file diff --git a/src/main/resources/assets/vivatech/models/block/sterling_generator_active.json b/src/main/resources/assets/vivatech/models/block/sterling_generator_active.json new file mode 100644 index 0000000..8ca7f23 --- /dev/null +++ b/src/main/resources/assets/vivatech/models/block/sterling_generator_active.json @@ -0,0 +1,6 @@ +{ + "parent": "vivatech:block/sterling_generator", + "textures": { + "front": "vivatech:block/sterling_generator_active_front" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/vivatech/models/item/coal_generator.json b/src/main/resources/assets/vivatech/models/item/coal_generator.json deleted file mode 100644 index 718f5f7..0000000 --- a/src/main/resources/assets/vivatech/models/item/coal_generator.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "vivatech:block/coal_generator" -} \ No newline at end of file diff --git a/src/main/resources/assets/vivatech/models/item/sterling_generator.json b/src/main/resources/assets/vivatech/models/item/sterling_generator.json new file mode 100644 index 0000000..e6afb1a --- /dev/null +++ b/src/main/resources/assets/vivatech/models/item/sterling_generator.json @@ -0,0 +1,3 @@ +{ + "parent": "vivatech:block/sterling_generator" +} \ No newline at end of file diff --git a/src/main/resources/assets/vivatech/textures/block/coal_generator_active_front.png b/src/main/resources/assets/vivatech/textures/block/sterling_generator_active_front.png similarity index 100% rename from src/main/resources/assets/vivatech/textures/block/coal_generator_active_front.png rename to src/main/resources/assets/vivatech/textures/block/sterling_generator_active_front.png diff --git a/src/main/resources/assets/vivatech/textures/block/coal_generator_front.png b/src/main/resources/assets/vivatech/textures/block/sterling_generator_front.png similarity index 100% rename from src/main/resources/assets/vivatech/textures/block/coal_generator_front.png rename to src/main/resources/assets/vivatech/textures/block/sterling_generator_front.png diff --git a/src/main/resources/data/vivatech/loot_tables/blocks/coal_generator.json b/src/main/resources/data/vivatech/loot_tables/blocks/sterling_generator.json similarity index 84% rename from src/main/resources/data/vivatech/loot_tables/blocks/coal_generator.json rename to src/main/resources/data/vivatech/loot_tables/blocks/sterling_generator.json index 81d916d..bdfddf2 100644 --- a/src/main/resources/data/vivatech/loot_tables/blocks/coal_generator.json +++ b/src/main/resources/data/vivatech/loot_tables/blocks/sterling_generator.json @@ -5,7 +5,7 @@ "entries": [ { "type": "minecraft:item", - "name": "vivatech:coal_generator" + "name": "vivatech:sterling_generator" } ], "conditions": [ diff --git a/src/main/resources/data/vivatech/recipes/coal_generator.json b/src/main/resources/data/vivatech/recipes/sterling_generator.json similarity index 89% rename from src/main/resources/data/vivatech/recipes/coal_generator.json rename to src/main/resources/data/vivatech/recipes/sterling_generator.json index 9afbd47..9b00887 100644 --- a/src/main/resources/data/vivatech/recipes/coal_generator.json +++ b/src/main/resources/data/vivatech/recipes/sterling_generator.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "vivatech:coal_generator" + "item": "vivatech:sterling_generator" } } \ No newline at end of file