From 83b33c3a5700da50203c0a35894df9aba3d750c0 Mon Sep 17 00:00:00 2001 From: TheIcyOne Date: Wed, 19 Apr 2017 23:58:48 +0100 Subject: [PATCH] Added passive heater, fluids and a bit of cleanup --- .../com/headfishindustries/sticky/Sticky.java | 9 +- .../sticky/blocks/BlockPassiveHeater.java | 43 +++++ .../sticky/blocks/LeavesBase.java | 4 +- .../sticky/blocks/fluid/BlockStickyFluid.java | 25 +++ .../sticky/blocks/fluid/FluidColdWater.java | 14 ++ .../sticky/blocks/fluid/FluidHotWater.java | 14 ++ .../blocks/fluid/FluidLukewarmWater.java | 14 ++ .../sticky/blocks/fluid/FluidSap.java | 16 ++ .../sticky/blocks/fluid/StickyFluids.java | 30 ++++ .../sticky/blocks/leaves/LeavesEnder.java | 10 -- .../sticky/blocks/leaves/LeavesExplosive.java | 12 +- .../sticky/blocks/leaves/LeavesNether.java | 10 -- .../sticky/blocks/leaves/LeavesPassive.java | 11 -- .../sticky/blocks/leaves/LeavesRainbow.java | 21 --- .../sticky/defs/BlockDefs.java | 7 + .../sticky/proxy/CommonProxy.java | 2 + .../sticky/blockstates/passive_heater.json | 13 ++ .../models/block/passive_heater_empty.json | 156 +++++++++++++++++ .../models/block/passive_heater_level1.json | 163 ++++++++++++++++++ .../models/block/passive_heater_level2.json | 163 ++++++++++++++++++ .../models/block/passive_heater_level3.json | 163 ++++++++++++++++++ .../sticky/models/item/passive_heater.json | 3 + 22 files changed, 836 insertions(+), 67 deletions(-) create mode 100644 src/main/java/com/headfishindustries/sticky/blocks/BlockPassiveHeater.java create mode 100644 src/main/java/com/headfishindustries/sticky/blocks/fluid/BlockStickyFluid.java create mode 100644 src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidColdWater.java create mode 100644 src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidHotWater.java create mode 100644 src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidLukewarmWater.java create mode 100644 src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidSap.java create mode 100644 src/main/java/com/headfishindustries/sticky/blocks/fluid/StickyFluids.java create mode 100644 src/main/resources/assets/sticky/blockstates/passive_heater.json create mode 100644 src/main/resources/assets/sticky/models/block/passive_heater_empty.json create mode 100644 src/main/resources/assets/sticky/models/block/passive_heater_level1.json create mode 100644 src/main/resources/assets/sticky/models/block/passive_heater_level2.json create mode 100644 src/main/resources/assets/sticky/models/block/passive_heater_level3.json create mode 100644 src/main/resources/assets/sticky/models/item/passive_heater.json diff --git a/src/main/java/com/headfishindustries/sticky/Sticky.java b/src/main/java/com/headfishindustries/sticky/Sticky.java index fcf5b23..c2da326 100644 --- a/src/main/java/com/headfishindustries/sticky/Sticky.java +++ b/src/main/java/com/headfishindustries/sticky/Sticky.java @@ -5,13 +5,14 @@ import com.headfishindustries.sticky.proxy.CommonProxy; +import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; +import net.minecraftforge.fml.common.event.FMLConstructionEvent; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent.PlayerTickEvent; @Mod(modid=Sticky.MODID, version = Sticky.VERSION, name="Sticky") public class Sticky { @@ -23,6 +24,12 @@ public class Sticky { @SidedProxy(clientSide="com.headfishindustries.sticky.proxy.ClientProxy", serverSide="com.headfishindustries.sticky.proxy.CommonProxy", modId=MODID) public static CommonProxy proxy; + @EventHandler + public void construct(FMLConstructionEvent e){ + //I'm not doing buckets myself. + FluidRegistry.enableUniversalBucket(); + } + @EventHandler public void preInit(FMLPreInitializationEvent e){ proxy.preInit(); diff --git a/src/main/java/com/headfishindustries/sticky/blocks/BlockPassiveHeater.java b/src/main/java/com/headfishindustries/sticky/blocks/BlockPassiveHeater.java new file mode 100644 index 0000000..60f9ddf --- /dev/null +++ b/src/main/java/com/headfishindustries/sticky/blocks/BlockPassiveHeater.java @@ -0,0 +1,43 @@ +package com.headfishindustries.sticky.blocks; + +import com.headfishindustries.sticky.blocks.fluid.StickyFluids; + +import net.minecraft.block.BlockCauldron; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.common.ForgeModContainer; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.UniversalBucket; + +public class BlockPassiveHeater extends BlockCauldron{ + + + @Override + public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) + { + ItemStack itemstack = playerIn.getHeldItem(hand); + + if (itemstack.getItem() == Items.BUCKET && state.getValue(LEVEL) == 3){ + float temp = checkBiome(worldIn, pos); + if (temp <= 0.2) playerIn.setHeldItem(hand, UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, StickyFluids.coldWater)); + else if (temp >= 1) playerIn.setHeldItem(hand, UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, StickyFluids.hotWater)); + else if (temp >= 0.6) playerIn.setHeldItem(hand, UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, StickyFluids.lukewarmWater)); + else playerIn.setHeldItem(hand, UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, FluidRegistry.WATER)); + this.setWaterLevel(worldIn, pos, state, 0); + return true; + } + else return super.onBlockActivated(worldIn, pos, state, playerIn, hand, facing, hitX, hitY, hitZ); + } + + public float checkBiome(World worldIn, BlockPos pos){ + return worldIn.getBiome(pos).getFloatTemperature(pos); + } + + +} diff --git a/src/main/java/com/headfishindustries/sticky/blocks/LeavesBase.java b/src/main/java/com/headfishindustries/sticky/blocks/LeavesBase.java index b681c97..b051c34 100644 --- a/src/main/java/com/headfishindustries/sticky/blocks/LeavesBase.java +++ b/src/main/java/com/headfishindustries/sticky/blocks/LeavesBase.java @@ -15,8 +15,6 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityList; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.item.EntityTNTPrimed; import net.minecraft.entity.passive.EntitySheep; import net.minecraft.item.EnumDyeColor; import net.minecraft.item.ItemStack; @@ -45,7 +43,6 @@ public boolean canGrow(World worldIn, BlockPos pos, IBlockState state, boolean i return true; } - @SuppressWarnings("unchecked") public void grow(World worldIn, Random rand, BlockPos pos, IBlockState state) { if (!(worldIn.getBlockState(pos).getBlock() instanceof LeavesBase)) return; Object s = randomValue(this.getValidSpawns()); @@ -56,6 +53,7 @@ public void grow(World worldIn, Random rand, BlockPos pos, IBlockState state) { } } + @SuppressWarnings("unchecked") public void entityGenerate(World world, BlockPos sPos, EnumTreeType type, Object c, Random r){ Entity e = null; try{ diff --git a/src/main/java/com/headfishindustries/sticky/blocks/fluid/BlockStickyFluid.java b/src/main/java/com/headfishindustries/sticky/blocks/fluid/BlockStickyFluid.java new file mode 100644 index 0000000..4fe5f4f --- /dev/null +++ b/src/main/java/com/headfishindustries/sticky/blocks/fluid/BlockStickyFluid.java @@ -0,0 +1,25 @@ +package com.headfishindustries.sticky.blocks.fluid; + +import javax.annotation.Nonnull; + +import com.headfishindustries.sticky.defs.TabDefs; + +import net.minecraft.block.material.Material; +import net.minecraftforge.fluids.BlockFluidClassic; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; + +public class BlockStickyFluid extends BlockFluidClassic{ + public BlockStickyFluid(Fluid fluid, Material material){ + super(fluid, material); + setCreativeTab(TabDefs.tabStickyTrees); + } + + @Nonnull + @Override + public String getUnlocalizedName() { + Fluid f = FluidRegistry.getFluid(fluidName); + if(f != null) return f.getUnlocalizedName(); + return super.getUnlocalizedName(); + } +} \ No newline at end of file diff --git a/src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidColdWater.java b/src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidColdWater.java new file mode 100644 index 0000000..cc4d36a --- /dev/null +++ b/src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidColdWater.java @@ -0,0 +1,14 @@ +package com.headfishindustries.sticky.blocks.fluid; + +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.Fluid; + +public class FluidColdWater extends Fluid{ + public static final String name = "cold_water"; + public static final FluidColdWater instance = new FluidColdWater(); + + public FluidColdWater() + { + super(name, new ResourceLocation("blocks/water_still"), new ResourceLocation("blocks/water_flowing")); + } +} diff --git a/src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidHotWater.java b/src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidHotWater.java new file mode 100644 index 0000000..f5f9b3e --- /dev/null +++ b/src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidHotWater.java @@ -0,0 +1,14 @@ +package com.headfishindustries.sticky.blocks.fluid; + +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.Fluid; + +public class FluidHotWater extends Fluid{ + public static final String name = "hot_water"; + public static final FluidHotWater instance = new FluidHotWater(); + + public FluidHotWater() + { + super(name, new ResourceLocation("blocks/water_still"), new ResourceLocation("blocks/water_flowing")); + } +} diff --git a/src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidLukewarmWater.java b/src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidLukewarmWater.java new file mode 100644 index 0000000..e80b85b --- /dev/null +++ b/src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidLukewarmWater.java @@ -0,0 +1,14 @@ +package com.headfishindustries.sticky.blocks.fluid; + +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.Fluid; + +public class FluidLukewarmWater extends Fluid{ + public static final String name = "lukewarm_water"; + public static final FluidLukewarmWater instance = new FluidLukewarmWater(); + + public FluidLukewarmWater() + { + super(name, new ResourceLocation("blocks/water_still"), new ResourceLocation("blocks/water_flowing")); + } +} diff --git a/src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidSap.java b/src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidSap.java new file mode 100644 index 0000000..82c073a --- /dev/null +++ b/src/main/java/com/headfishindustries/sticky/blocks/fluid/FluidSap.java @@ -0,0 +1,16 @@ +package com.headfishindustries.sticky.blocks.fluid; + +import com.headfishindustries.sticky.Sticky; + +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.Fluid; + +public class FluidSap extends Fluid{ + public static final String name = "sap"; + public static final FluidSap instance = new FluidSap(); + + public FluidSap() + { + super(name, new ResourceLocation(Sticky.MODID + ":blocks/" + name + "_still"), new ResourceLocation(Sticky.MODID + ":blocks/" + name + "_flowing")); + } +} diff --git a/src/main/java/com/headfishindustries/sticky/blocks/fluid/StickyFluids.java b/src/main/java/com/headfishindustries/sticky/blocks/fluid/StickyFluids.java new file mode 100644 index 0000000..0cea08a --- /dev/null +++ b/src/main/java/com/headfishindustries/sticky/blocks/fluid/StickyFluids.java @@ -0,0 +1,30 @@ +package com.headfishindustries.sticky.blocks.fluid; + +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; + +public class StickyFluids { + public static Fluid coldWater; + public static Fluid lukewarmWater; + public static Fluid hotWater; + public static Fluid sap; + + static{setupFluids();} + public static void setupFluids(){ + coldWater = FluidColdWater.instance; + coldWater.setTemperature(5); + FluidRegistry.addBucketForFluid(coldWater); + + lukewarmWater = FluidLukewarmWater.instance; + lukewarmWater.setTemperature(32); + FluidRegistry.addBucketForFluid(lukewarmWater); + + hotWater = FluidHotWater.instance; + hotWater.setTemperature(95); + FluidRegistry.addBucketForFluid(hotWater); + + sap = FluidSap.instance; + sap.setTemperature(32); + FluidRegistry.addBucketForFluid(sap); + } +} diff --git a/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesEnder.java b/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesEnder.java index 1cfe5c8..7e75089 100644 --- a/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesEnder.java +++ b/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesEnder.java @@ -6,18 +6,8 @@ import com.headfishindustries.sticky.blocks.LeavesBase; import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.monster.EntityEvoker; -import net.minecraft.entity.monster.EntityHusk; import net.minecraft.entity.monster.EntityShulker; -import net.minecraft.entity.monster.EntitySkeleton; -import net.minecraft.entity.monster.EntitySlime; -import net.minecraft.entity.monster.EntityStray; -import net.minecraft.entity.monster.EntityVex; -import net.minecraft.entity.monster.EntityVindicator; -import net.minecraft.entity.monster.EntityWitch; -import net.minecraft.entity.monster.EntityZombie; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; diff --git a/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesExplosive.java b/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesExplosive.java index 75e9b4d..d69a1a6 100644 --- a/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesExplosive.java +++ b/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesExplosive.java @@ -8,17 +8,7 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityTNTPrimed; import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.monster.EntityEvoker; import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.monster.EntityHusk; -import net.minecraft.entity.monster.EntitySkeleton; -import net.minecraft.entity.monster.EntitySlime; -import net.minecraft.entity.monster.EntityStray; -import net.minecraft.entity.monster.EntityVex; -import net.minecraft.entity.monster.EntityVindicator; -import net.minecraft.entity.monster.EntityWitch; -import net.minecraft.entity.monster.EntityZombie; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -40,7 +30,7 @@ public HashMap getValidSpawns() { HashMap spawns = new HashMap(); spawns.put(EntityCreeper.class, 100); spawns.put(EntityGhast.class, 25); - spawns.put(EntityTNTPrimed.class, 2); + spawns.put(EntityTNTPrimed.class, 200); return spawns; } diff --git a/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesNether.java b/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesNether.java index 6825aac..2316976 100644 --- a/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesNether.java +++ b/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesNether.java @@ -7,20 +7,10 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.entity.monster.EntityBlaze; -import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.monster.EntityEvoker; import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.monster.EntityHusk; import net.minecraft.entity.monster.EntityPigZombie; -import net.minecraft.entity.monster.EntitySkeleton; -import net.minecraft.entity.monster.EntitySlime; -import net.minecraft.entity.monster.EntityStray; -import net.minecraft.entity.monster.EntityVex; -import net.minecraft.entity.monster.EntityVindicator; -import net.minecraft.entity.monster.EntityWitch; import net.minecraft.entity.monster.EntityWitherSkeleton; -import net.minecraft.entity.monster.EntityZombie; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; diff --git a/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesPassive.java b/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesPassive.java index f9dc04b..ff74186 100644 --- a/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesPassive.java +++ b/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesPassive.java @@ -6,17 +6,6 @@ import com.headfishindustries.sticky.blocks.LeavesBase; import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.monster.EntityEvoker; -import net.minecraft.entity.monster.EntityHusk; -import net.minecraft.entity.monster.EntitySkeleton; -import net.minecraft.entity.monster.EntitySlime; -import net.minecraft.entity.monster.EntityStray; -import net.minecraft.entity.monster.EntityVex; -import net.minecraft.entity.monster.EntityVindicator; -import net.minecraft.entity.monster.EntityWitch; -import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.passive.EntityBat; import net.minecraft.entity.passive.EntityChicken; import net.minecraft.entity.passive.EntityCow; diff --git a/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesRainbow.java b/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesRainbow.java index 30ffdc3..0a19408 100644 --- a/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesRainbow.java +++ b/src/main/java/com/headfishindustries/sticky/blocks/leaves/LeavesRainbow.java @@ -6,30 +6,9 @@ import com.headfishindustries.sticky.blocks.LeavesBase; import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityElderGuardian; -import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.monster.EntityEvoker; import net.minecraft.entity.monster.EntityGuardian; -import net.minecraft.entity.monster.EntityHusk; -import net.minecraft.entity.monster.EntitySkeleton; -import net.minecraft.entity.monster.EntitySlime; -import net.minecraft.entity.monster.EntityStray; -import net.minecraft.entity.monster.EntityVex; -import net.minecraft.entity.monster.EntityVindicator; -import net.minecraft.entity.monster.EntityWitch; -import net.minecraft.entity.monster.EntityZombie; -import net.minecraft.entity.passive.EntityBat; -import net.minecraft.entity.passive.EntityChicken; -import net.minecraft.entity.passive.EntityCow; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.passive.EntityOcelot; -import net.minecraft.entity.passive.EntityPig; -import net.minecraft.entity.passive.EntityRabbit; import net.minecraft.entity.passive.EntitySheep; -import net.minecraft.entity.passive.EntitySquid; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.entity.passive.EntityWolf; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; diff --git a/src/main/java/com/headfishindustries/sticky/defs/BlockDefs.java b/src/main/java/com/headfishindustries/sticky/defs/BlockDefs.java index 8e94ad2..36588d7 100644 --- a/src/main/java/com/headfishindustries/sticky/defs/BlockDefs.java +++ b/src/main/java/com/headfishindustries/sticky/defs/BlockDefs.java @@ -2,6 +2,8 @@ import com.headfishindustries.sticky.blocks.logs.*; import com.headfishindustries.sticky.blocks.sapling.*; +import com.headfishindustries.sticky.Sticky; +import com.headfishindustries.sticky.blocks.BlockPassiveHeater; import com.headfishindustries.sticky.blocks.leaves.*; import net.minecraft.block.Block; @@ -44,6 +46,8 @@ public class BlockDefs { public static final Block logRainbow = registerBlock(new LogRainbow(), "log_rainbow").setUnlocalizedName("lograinbow"); public static final Block saplingRainbow = registerBlock(new SaplingRainbow(), "sapling_rainbow").setUnlocalizedName("saplingrainbow"); + public static final Block passiveHeater = registerBlock(new BlockPassiveHeater(), "passive_heater").setUnlocalizedName("passive_heater"); + public void preInit(){ //Do things later. Not now. @@ -53,6 +57,7 @@ private static Block registerBlock(Block block, String name){ if(block.getRegistryName() == null) block.setRegistryName(name); GameRegistry.register(block); + Sticky.LOGGER.info("Registering block " + block.getRegistryName()); GameRegistry.register(new ItemBlock(block).setRegistryName(name)); return block; } @@ -92,6 +97,8 @@ public static void initClient() { registerTexture(leavesRainbow); registerTexture(logRainbow); registerTexture(saplingRainbow); + + registerTexture(passiveHeater); } } diff --git a/src/main/java/com/headfishindustries/sticky/proxy/CommonProxy.java b/src/main/java/com/headfishindustries/sticky/proxy/CommonProxy.java index 58eec4a..5e8df83 100644 --- a/src/main/java/com/headfishindustries/sticky/proxy/CommonProxy.java +++ b/src/main/java/com/headfishindustries/sticky/proxy/CommonProxy.java @@ -1,5 +1,6 @@ package com.headfishindustries.sticky.proxy; +import com.headfishindustries.sticky.blocks.fluid.StickyFluids; import com.headfishindustries.sticky.defs.BlockDefs; import com.headfishindustries.sticky.defs.TabDefs; @@ -8,6 +9,7 @@ public class CommonProxy { BlockDefs blocks; public void preInit(){ + StickyFluids.setupFluids(); new TabDefs(); blocks = new BlockDefs(); blocks.preInit(); diff --git a/src/main/resources/assets/sticky/blockstates/passive_heater.json b/src/main/resources/assets/sticky/blockstates/passive_heater.json new file mode 100644 index 0000000..a30a21f --- /dev/null +++ b/src/main/resources/assets/sticky/blockstates/passive_heater.json @@ -0,0 +1,13 @@ +{ + "forge_marker": 1, + "defaults": { + "transform": "forge:default-block" + }, + "variants": { + "level=0": { "model": "sticky:passive_heater_empty" }, + "level=1": { "model": "sticky:passive_heater_level1" }, + "level=2": { "model": "sticky:passive_heater_level2" }, + "level=3": { "model": "sticky:passive_heater_level3" }, + "normal": { "model": "sticky:passive_heater_empty" } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sticky/models/block/passive_heater_empty.json b/src/main/resources/assets/sticky/models/block/passive_heater_empty.json new file mode 100644 index 0000000..5cb1a4a --- /dev/null +++ b/src/main/resources/assets/sticky/models/block/passive_heater_empty.json @@ -0,0 +1,156 @@ +{ + "parent":"block/block", + "ambientocclusion": false, + "textures": { + "particle": "blocks/log_oak", + "top": "blocks/log_oak", + "bottom": "blocks/log_oak", + "side": "blocks/log_oak", + "inside": "blocks/log_oak" + }, + "elements": [ + { "from": [ 0, 3, 0 ], + "to": [ 2, 16, 16 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 2, 3, 2 ], + "to": [ 14, 4, 14 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#inside", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 14, 3, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 2, 3, 0 ], + "to": [ 14, 16, 2 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 2, 3, 14 ], + "to": [ 14, 16, 16 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 0, 0, 0 ], + "to": [ 4, 3, 2 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 0, 0, 2 ], + "to": [ 2, 3, 4 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 12, 0, 0 ], + "to": [ 16, 3, 2 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 14, 0, 2 ], + "to": [ 16, 3, 4 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 0, 0, 14 ], + "to": [ 4, 3, 16 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 0, 0, 12 ], + "to": [ 2, 3, 14 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 12, 0, 14 ], + "to": [ 16, 3, 16 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 14, 0, 12 ], + "to": [ 16, 3, 14 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + } + ] +} diff --git a/src/main/resources/assets/sticky/models/block/passive_heater_level1.json b/src/main/resources/assets/sticky/models/block/passive_heater_level1.json new file mode 100644 index 0000000..832904e --- /dev/null +++ b/src/main/resources/assets/sticky/models/block/passive_heater_level1.json @@ -0,0 +1,163 @@ +{ + "parent":"block/block", + "ambientocclusion": false, + "textures": { + "particle": "blocks/log_oak", + "top": "blocks/log_oak", + "bottom": "blocks/log_oak", + "side": "blocks/log_oak", + "inside": "blocks/log_oak", + "water": "blocks/water_still" + }, + "elements": [ + { "from": [ 0, 3, 0 ], + "to": [ 2, 16, 16 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 2, 3, 2 ], + "to": [ 14, 4, 14 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#inside", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 14, 3, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 2, 3, 0 ], + "to": [ 14, 16, 2 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 2, 3, 14 ], + "to": [ 14, 16, 16 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 0, 0, 0 ], + "to": [ 4, 3, 2 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 0, 0, 2 ], + "to": [ 2, 3, 4 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 12, 0, 0 ], + "to": [ 16, 3, 2 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 14, 0, 2 ], + "to": [ 16, 3, 4 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 0, 0, 14 ], + "to": [ 4, 3, 16 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 0, 0, 12 ], + "to": [ 2, 3, 14 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 12, 0, 14 ], + "to": [ 16, 3, 16 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 14, 0, 12 ], + "to": [ 16, 3, 14 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 2, 9, 2 ], + "to": [ 14, 9, 14 ], + "faces": { + "up": { "texture": "#water" } + } + } + ] +} diff --git a/src/main/resources/assets/sticky/models/block/passive_heater_level2.json b/src/main/resources/assets/sticky/models/block/passive_heater_level2.json new file mode 100644 index 0000000..cacc58b --- /dev/null +++ b/src/main/resources/assets/sticky/models/block/passive_heater_level2.json @@ -0,0 +1,163 @@ +{ + "parent":"block/block", + "ambientocclusion": false, + "textures": { + "particle": "blocks/log_oak", + "top": "blocks/log_oak", + "bottom": "blocks/log_oak", + "side": "blocks/log_oak", + "inside": "blocks/log_oak", + "water": "blocks/water_still" + }, + "elements": [ + { "from": [ 0, 3, 0 ], + "to": [ 2, 16, 16 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 2, 3, 2 ], + "to": [ 14, 4, 14 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#inside", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 14, 3, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 2, 3, 0 ], + "to": [ 14, 16, 2 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 2, 3, 14 ], + "to": [ 14, 16, 16 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 0, 0, 0 ], + "to": [ 4, 3, 2 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 0, 0, 2 ], + "to": [ 2, 3, 4 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 12, 0, 0 ], + "to": [ 16, 3, 2 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 14, 0, 2 ], + "to": [ 16, 3, 4 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 0, 0, 14 ], + "to": [ 4, 3, 16 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 0, 0, 12 ], + "to": [ 2, 3, 14 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 12, 0, 14 ], + "to": [ 16, 3, 16 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 14, 0, 12 ], + "to": [ 16, 3, 14 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 2, 12, 2 ], + "to": [ 14, 12, 14 ], + "faces": { + "up": { "texture": "#water" } + } + } + ] +} diff --git a/src/main/resources/assets/sticky/models/block/passive_heater_level3.json b/src/main/resources/assets/sticky/models/block/passive_heater_level3.json new file mode 100644 index 0000000..703a9cb --- /dev/null +++ b/src/main/resources/assets/sticky/models/block/passive_heater_level3.json @@ -0,0 +1,163 @@ +{ + "parent":"block/block", + "ambientocclusion": false, + "textures": { + "particle": "blocks/log_oak", + "top": "blocks/log_oak", + "bottom": "blocks/log_oak", + "side": "blocks/log_oak", + "inside": "blocks/log_oak", + "water": "blocks/water_still" + }, + "elements": [ + { "from": [ 0, 3, 0 ], + "to": [ 2, 16, 16 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 2, 3, 2 ], + "to": [ 14, 4, 14 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#inside", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 14, 3, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 2, 3, 0 ], + "to": [ 14, 16, 2 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 2, 3, 14 ], + "to": [ 14, 16, 16 ], + "faces": { + "down": { "texture": "#inside" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { "from": [ 0, 0, 0 ], + "to": [ 4, 3, 2 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 0, 0, 2 ], + "to": [ 2, 3, 4 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 12, 0, 0 ], + "to": [ 16, 3, 2 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 14, 0, 2 ], + "to": [ 16, 3, 4 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 0, 0, 14 ], + "to": [ 4, 3, 16 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 0, 0, 12 ], + "to": [ 2, 3, 14 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 12, 0, 14 ], + "to": [ 16, 3, 16 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 14, 0, 12 ], + "to": [ 16, 3, 14 ], + "faces": { + "down": { "texture": "#bottom" }, + "up": { "texture": "#top" }, + "north": { "texture": "#side" }, + "south": { "texture": "#side" }, + "west": { "texture": "#side" }, + "east": { "texture": "#side" } + } + }, + { "from": [ 2, 15, 2 ], + "to": [ 14, 15, 14 ], + "faces": { + "up": { "texture": "#water" } + } + } + ] +} diff --git a/src/main/resources/assets/sticky/models/item/passive_heater.json b/src/main/resources/assets/sticky/models/item/passive_heater.json new file mode 100644 index 0000000..2ec8fc7 --- /dev/null +++ b/src/main/resources/assets/sticky/models/item/passive_heater.json @@ -0,0 +1,3 @@ +{ + "parent": "sticky:block/passive_heater_empty" +} \ No newline at end of file