From 492e1e9eced8da576ca6d460c8d5ae5bb3e75c43 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 27 May 2014 20:15:58 +0200 Subject: [PATCH 01/10] Generalize biome decorator --- .../universe_factory/minecraft/test/Test.java | 47 ++- .../minecraft/test/TestBiomeDecorator.java | 229 -------------- .../minecraft/test/generic/GenericCrops.java | 5 - .../minecraft/test/generic/GenericWood.java | 7 +- .../test/generic/WorldGenGenericTrees.java | 21 +- .../test/world/ExtensibleBiomeDecorator.java | 283 ++++++++++++++++++ 6 files changed, 338 insertions(+), 254 deletions(-) delete mode 100644 java/net/universe_factory/minecraft/test/TestBiomeDecorator.java create mode 100644 java/net/universe_factory/minecraft/test/world/ExtensibleBiomeDecorator.java diff --git a/java/net/universe_factory/minecraft/test/Test.java b/java/net/universe_factory/minecraft/test/Test.java index 06de7ad..32566a9 100644 --- a/java/net/universe_factory/minecraft/test/Test.java +++ b/java/net/universe_factory/minecraft/test/Test.java @@ -1,6 +1,9 @@ package net.universe_factory.minecraft.test; +import java.util.AbstractMap; import java.util.ArrayList; +import java.util.Map.Entry; +import java.util.Random; import net.minecraft.init.Blocks; import net.minecraft.item.Item; @@ -8,10 +11,15 @@ import net.minecraft.item.ItemFood; import net.minecraft.item.ItemSeeds; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.feature.WorldGenAbstractTree; +import net.minecraft.world.gen.feature.WorldGenTrees; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.terraingen.BiomeEvent.CreateDecorator; import net.universe_factory.minecraft.test.generic.GenericCrops; import net.universe_factory.minecraft.test.generic.GenericWood; +import net.universe_factory.minecraft.test.generic.WorldGenGenericTrees; +import net.universe_factory.minecraft.test.world.ExtensibleBiomeDecorator; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; @@ -59,6 +67,9 @@ public class Test { } }; + WorldGenGenericTrees cherryTreeGenerator = WorldGenGenericTrees.newInstance(false, false, cherryTree); + WorldGenGenericTrees cherryTreeGeneratorBig = WorldGenGenericTrees.newInstance(false, true, cherryTree); + public static final GenericCrops saladField = new GenericCrops() { @Override public String getName() { @@ -74,11 +85,18 @@ public class Test { public Item itemSeeds() { return saladSeeds; } + + @Override + public int getRenderType() { + return 1; + } }; public static final Item saladSeeds = new ItemSeeds(saladField, Blocks.farmland).setTextureName(MODID + ":seeds_salad") .setUnlocalizedName("seedsSalad"); public static final Item salad = new ItemFood(3, 0.8f, false).setTextureName(MODID + ":salad").setUnlocalizedName("salad"); + public static final ExtensibleBiomeDecorator biomeDecorator = new ExtensibleBiomeDecorator(); + @EventHandler public void preInit(FMLInitializationEvent event) { MinecraftForge.TERRAIN_GEN_BUS.register(new TerrainGenHandler()); @@ -89,26 +107,25 @@ public class Test { GameRegistry.registerItem(saladSeeds, "seeds_salad"); GameRegistry.registerItem(salad, "salad"); GameRegistry.registerBlock(saladField, null, "salad"); + + biomeDecorator.registerTree(new ExtensibleBiomeDecorator.Tree() { + @Override + public Entry replaceTree(World world, BiomeGenBase biome, Random random, int x, int y, int z, + WorldGenAbstractTree orig) { + if (!(orig instanceof WorldGenTrees) || biome.getTempCategory() != BiomeGenBase.TempCategory.MEDIUM) + return null; + + WorldGenAbstractTree generator = (random.nextInt(3) == 0) ? cherryTreeGenerator : cherryTreeGeneratorBig; + + return new AbstractMap.SimpleEntry(generator, 0.5f); + } + }); } public class TerrainGenHandler { @SubscribeEvent public void handleCreateDecorator(CreateDecorator event) { - event.newBiomeDecorator = new TestBiomeDecorator(cherryTree); - - event.newBiomeDecorator.bigMushroomsPerChunk = event.originalBiomeDecorator.bigMushroomsPerChunk; - event.newBiomeDecorator.cactiPerChunk = event.originalBiomeDecorator.cactiPerChunk; - event.newBiomeDecorator.clayPerChunk = event.originalBiomeDecorator.clayPerChunk; - event.newBiomeDecorator.deadBushPerChunk = event.originalBiomeDecorator.deadBushPerChunk; - event.newBiomeDecorator.flowersPerChunk = event.originalBiomeDecorator.flowersPerChunk; - event.newBiomeDecorator.generateLakes = event.originalBiomeDecorator.generateLakes; - event.newBiomeDecorator.grassPerChunk = event.originalBiomeDecorator.grassPerChunk; - event.newBiomeDecorator.mushroomsPerChunk = event.originalBiomeDecorator.mushroomsPerChunk; - event.newBiomeDecorator.reedsPerChunk = event.originalBiomeDecorator.reedsPerChunk; - event.newBiomeDecorator.sandPerChunk = event.originalBiomeDecorator.sandPerChunk; - event.newBiomeDecorator.sandPerChunk2 = event.originalBiomeDecorator.sandPerChunk2; - event.newBiomeDecorator.treesPerChunk = event.originalBiomeDecorator.treesPerChunk; - event.newBiomeDecorator.waterlilyPerChunk = event.originalBiomeDecorator.waterlilyPerChunk; + event.newBiomeDecorator = biomeDecorator.getInstance(event.originalBiomeDecorator); } } } diff --git a/java/net/universe_factory/minecraft/test/TestBiomeDecorator.java b/java/net/universe_factory/minecraft/test/TestBiomeDecorator.java deleted file mode 100644 index f25e83e..0000000 --- a/java/net/universe_factory/minecraft/test/TestBiomeDecorator.java +++ /dev/null @@ -1,229 +0,0 @@ -package net.universe_factory.minecraft.test; - -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.BIG_SHROOM; -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.CACTUS; -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.CLAY; -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.DEAD_BUSH; -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.FLOWERS; -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.GRASS; -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.LAKE; -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.LILYPAD; -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.PUMPKIN; -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.REED; -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.SAND; -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.SAND_PASS2; -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.SHROOM; -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.TREE; -import net.minecraft.block.BlockFlower; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; -import net.minecraft.world.biome.BiomeDecorator; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.gen.feature.WorldGenAbstractTree; -import net.minecraft.world.gen.feature.WorldGenDeadBush; -import net.minecraft.world.gen.feature.WorldGenLiquids; -import net.minecraft.world.gen.feature.WorldGenPumpkin; -import net.minecraft.world.gen.feature.WorldGenTrees; -import net.minecraft.world.gen.feature.WorldGenerator; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.terraingen.DecorateBiomeEvent; -import net.minecraftforge.event.terraingen.TerrainGen; -import net.universe_factory.minecraft.test.generic.GenericWood; -import net.universe_factory.minecraft.test.generic.WorldGenGenericTrees; - -public class TestBiomeDecorator extends BiomeDecorator { - protected WorldGenGenericTrees worldGenGenericTrees; - - public TestBiomeDecorator(GenericWood genericWood) { - worldGenGenericTrees = new WorldGenGenericTrees(false, genericWood); - } - - protected void genDecorations(BiomeGenBase biome) { - MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); - this.generateOres(); - int i; - int j; - int k; - - boolean doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND); - for (i = 0; doGen && i < this.sandPerChunk2; ++i) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.sandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CLAY); - for (i = 0; doGen && i < this.clayPerChunk; ++i) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.clayGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND_PASS2); - for (i = 0; doGen && i < this.sandPerChunk; ++i) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.gravelAsSandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); - } - - i = this.treesPerChunk; - - if (this.randomGenerator.nextInt(10) == 0) { - ++i; - } - - int l; - int i1; - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, TREE); - for (j = 0; doGen && j < i; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.currentWorld.getHeightValue(k, l); - WorldGenAbstractTree worldgenabstracttree = biome.func_150567_a(this.randomGenerator); - - if (worldgenabstracttree instanceof WorldGenTrees && biome.getTempCategory() == BiomeGenBase.TempCategory.MEDIUM - && this.randomGenerator.nextDouble() < 0.5f) { - worldgenabstracttree = this.worldGenGenericTrees; - } - - worldgenabstracttree.setScale(1.0D, 1.0D, 1.0D); - - if (worldgenabstracttree.generate(this.currentWorld, this.randomGenerator, k, i1, l)) { - worldgenabstracttree.func_150524_b(this.currentWorld, this.randomGenerator, k, i1, l); - } - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, BIG_SHROOM); - for (j = 0; doGen && j < this.bigMushroomsPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.bigMushroomGen.generate(this.currentWorld, this.randomGenerator, k, this.currentWorld.getHeightValue(k, l), l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, FLOWERS); - for (j = 0; doGen && j < this.flowersPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) + 32); - String s = biome.func_150572_a(this.randomGenerator, k, i1, l); - BlockFlower blockflower = BlockFlower.func_149857_e(s); - - if (blockflower.getMaterial() != Material.air) { - this.yellowFlowerGen.func_150550_a(blockflower, BlockFlower.func_149856_f(s)); - this.yellowFlowerGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, GRASS); - for (j = 0; doGen && j < this.grassPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) * 2); - WorldGenerator worldgenerator = biome.getRandomWorldGenForGrass(this.randomGenerator); - worldgenerator.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, DEAD_BUSH); - for (j = 0; doGen && j < this.deadBushPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) * 2); - (new WorldGenDeadBush(Blocks.deadbush)).generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LILYPAD); - for (j = 0; doGen && j < this.waterlilyPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - - for (i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) * 2); i1 > 0 - && this.currentWorld.isAirBlock(k, i1 - 1, l); --i1) { - ; - } - - this.waterlilyGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SHROOM); - for (j = 0; doGen && j < this.mushroomsPerChunk; ++j) { - if (this.randomGenerator.nextInt(4) == 0) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.currentWorld.getHeightValue(k, l); - this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - if (this.randomGenerator.nextInt(8) == 0) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - } - - if (doGen && this.randomGenerator.nextInt(4) == 0) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - l = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(j, k) * 2); - this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, j, l, k); - } - - if (doGen && this.randomGenerator.nextInt(8) == 0) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - l = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(j, k) * 2); - this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, j, l, k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, REED); - for (j = 0; doGen && j < this.reedsPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - for (j = 0; doGen && j < 10; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, PUMPKIN); - if (doGen && this.randomGenerator.nextInt(32) == 0) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - l = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(j, k) * 2); - (new WorldGenPumpkin()).generate(this.currentWorld, this.randomGenerator, j, l, k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CACTUS); - for (j = 0; doGen && j < this.cactiPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.cactusGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LAKE); - if (doGen && this.generateLakes) { - for (j = 0; j < 50; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(248) + 8); - i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - (new WorldGenLiquids(Blocks.flowing_water)).generate(this.currentWorld, this.randomGenerator, k, l, i1); - } - - for (j = 0; j < 20; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(this.randomGenerator.nextInt(240) + 8) + 8); - i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - (new WorldGenLiquids(Blocks.flowing_lava)).generate(this.currentWorld, this.randomGenerator, k, l, i1); - } - } - - MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); - } -} diff --git a/java/net/universe_factory/minecraft/test/generic/GenericCrops.java b/java/net/universe_factory/minecraft/test/generic/GenericCrops.java index 0ed2107..384dae3 100644 --- a/java/net/universe_factory/minecraft/test/generic/GenericCrops.java +++ b/java/net/universe_factory/minecraft/test/generic/GenericCrops.java @@ -47,11 +47,6 @@ public abstract class GenericCrops extends BlockCrops { } } - @Override - public int getRenderType() { - return 1; - } - public abstract String getName(); public abstract Item itemCrops(); diff --git a/java/net/universe_factory/minecraft/test/generic/GenericWood.java b/java/net/universe_factory/minecraft/test/generic/GenericWood.java index 0bb4639..6a04729 100644 --- a/java/net/universe_factory/minecraft/test/generic/GenericWood.java +++ b/java/net/universe_factory/minecraft/test/generic/GenericWood.java @@ -229,6 +229,9 @@ public abstract class GenericWood { } private class Sapling extends BlockSapling { + WorldGenerator generator = WorldGenGenericTrees.newInstance(true, false, GenericWood.this); + WorldGenerator generatorBig = WorldGenGenericTrees.newInstance(true, true, GenericWood.this); + public Sapling() { setBlockName("sapling" + getName()); @@ -262,11 +265,11 @@ public abstract class GenericWood { if (!TerrainGen.saplingGrowTree(world, random, x, y, z)) return; - WorldGenerator generator = new WorldGenGenericTrees(true, GenericWood.this); + WorldGenerator treeGenerator = (random.nextInt(10) == 0) ? generatorBig : generator; world.setBlock(x, y, z, Blocks.air, 0, 4); - if (!generator.generate(world, random, x, y, z)) + if (!treeGenerator.generate(world, random, x, y, z)) world.setBlock(x, y, z, this, 0, 4); } } diff --git a/java/net/universe_factory/minecraft/test/generic/WorldGenGenericTrees.java b/java/net/universe_factory/minecraft/test/generic/WorldGenGenericTrees.java index e7614fa..3726ef4 100644 --- a/java/net/universe_factory/minecraft/test/generic/WorldGenGenericTrees.java +++ b/java/net/universe_factory/minecraft/test/generic/WorldGenGenericTrees.java @@ -9,18 +9,33 @@ import net.minecraftforge.common.util.ForgeDirection; public class WorldGenGenericTrees extends WorldGenAbstractTree { private final GenericWood genericWood; + private final int minHeight; + private final boolean big; - public WorldGenGenericTrees(boolean b, GenericWood genericWood) { - super(b); + public static WorldGenGenericTrees newInstance(boolean notify, boolean big, GenericWood genericWood) { + return new WorldGenGenericTrees(notify, big, genericWood, genericWood.getMinTreeHeight()); + } + + public static WorldGenGenericTrees newForestInstance(boolean notify, boolean big, GenericWood genericWood) { + return new WorldGenGenericTrees(notify, big, genericWood, 5); + } + + protected WorldGenGenericTrees(boolean notify, boolean big, GenericWood genericWood, int minHeight) { + super(notify); this.genericWood = genericWood; + this.minHeight = minHeight; + this.big = big; } @Override public boolean generate(World world, Random random, int x, int y, int z) { - int height = random.nextInt(3) + genericWood.getMinTreeHeight(); + int height = random.nextInt(3) + minHeight; boolean flag = true; + if (big) + height += random.nextInt(7); + if (y >= 1 && y + height + 1 <= 256) { byte b0; int k1; diff --git a/java/net/universe_factory/minecraft/test/world/ExtensibleBiomeDecorator.java b/java/net/universe_factory/minecraft/test/world/ExtensibleBiomeDecorator.java new file mode 100644 index 0000000..57f0a8f --- /dev/null +++ b/java/net/universe_factory/minecraft/test/world/ExtensibleBiomeDecorator.java @@ -0,0 +1,283 @@ +package net.universe_factory.minecraft.test.world; + +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.BIG_SHROOM; +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.CACTUS; +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.CLAY; +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.DEAD_BUSH; +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.FLOWERS; +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.GRASS; +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.LAKE; +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.LILYPAD; +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.PUMPKIN; +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.REED; +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.SAND; +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.SAND_PASS2; +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.SHROOM; +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.TREE; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; + +import net.minecraft.block.BlockFlower; +import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeDecorator; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.feature.WorldGenAbstractTree; +import net.minecraft.world.gen.feature.WorldGenDeadBush; +import net.minecraft.world.gen.feature.WorldGenLiquids; +import net.minecraft.world.gen.feature.WorldGenPumpkin; +import net.minecraft.world.gen.feature.WorldGenerator; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.terraingen.DecorateBiomeEvent; +import net.minecraftforge.event.terraingen.TerrainGen; + +public class ExtensibleBiomeDecorator { + private ArrayList trees = new ArrayList(); + + public void registerTree(Tree tree) { + trees.add(tree); + } + + public BiomeDecorator getInstance(BiomeDecorator base) { + BiomeDecorator decorator = new Decorator(); + + if (base != null) { + decorator.bigMushroomsPerChunk = base.bigMushroomsPerChunk; + decorator.cactiPerChunk = base.cactiPerChunk; + decorator.clayPerChunk = base.clayPerChunk; + decorator.deadBushPerChunk = base.deadBushPerChunk; + decorator.flowersPerChunk = base.flowersPerChunk; + decorator.generateLakes = base.generateLakes; + decorator.grassPerChunk = base.grassPerChunk; + decorator.mushroomsPerChunk = base.mushroomsPerChunk; + decorator.reedsPerChunk = base.reedsPerChunk; + decorator.sandPerChunk = base.sandPerChunk; + decorator.sandPerChunk2 = base.sandPerChunk2; + decorator.treesPerChunk = base.treesPerChunk; + decorator.waterlilyPerChunk = base.waterlilyPerChunk; + } + + return decorator; + } + + public interface Tree { + public Map.Entry replaceTree(World world, BiomeGenBase biome, Random random, int x, int y, int z, + WorldGenAbstractTree orig); + } + + protected class Decorator extends BiomeDecorator { + protected void genDecorations(BiomeGenBase biome) { + MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); + this.generateOres(); + int i; + int j; + int k; + + boolean doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND); + for (i = 0; doGen && i < this.sandPerChunk2; ++i) { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.sandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CLAY); + for (i = 0; doGen && i < this.clayPerChunk; ++i) { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.clayGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND_PASS2); + for (i = 0; doGen && i < this.sandPerChunk; ++i) { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.gravelAsSandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); + } + + i = this.treesPerChunk; + + if (this.randomGenerator.nextInt(10) == 0) { + ++i; + } + + int l; + int i1; + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, TREE); + for (j = 0; doGen && j < i; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = this.currentWorld.getHeightValue(k, l); + + WorldGenAbstractTree defaultTreeGen = biome.func_150567_a(this.randomGenerator); + + float weight = 1.0f; + Map treeWeights = new HashMap(); + treeWeights.put(defaultTreeGen, 1.0f); + + for (Tree tree : trees) { + Map.Entry entry = tree.replaceTree(currentWorld, biome, randomGenerator, k, i1, l, + defaultTreeGen); + + if (entry != null) { + weight += entry.getValue(); + treeWeights.put(entry.getKey(), entry.getValue()); + } + } + + WorldGenAbstractTree treeGen = null; + float p = randomGenerator.nextFloat() * weight; + + for (Map.Entry entry : treeWeights.entrySet()) { + p -= entry.getValue(); + + if (p < 0) { + treeGen = entry.getKey(); + break; + } + } + + treeGen.setScale(1.0D, 1.0D, 1.0D); + + if (treeGen.generate(this.currentWorld, this.randomGenerator, k, i1, l)) + treeGen.func_150524_b(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, BIG_SHROOM); + for (j = 0; doGen && j < this.bigMushroomsPerChunk; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.bigMushroomGen.generate(this.currentWorld, this.randomGenerator, k, this.currentWorld.getHeightValue(k, l), l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, FLOWERS); + for (j = 0; doGen && j < this.flowersPerChunk; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) + 32); + String s = biome.func_150572_a(this.randomGenerator, k, i1, l); + BlockFlower blockflower = BlockFlower.func_149857_e(s); + + if (blockflower.getMaterial() != Material.air) { + this.yellowFlowerGen.func_150550_a(blockflower, BlockFlower.func_149856_f(s)); + this.yellowFlowerGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, GRASS); + for (j = 0; doGen && j < this.grassPerChunk; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) * 2); + WorldGenerator worldgenerator = biome.getRandomWorldGenForGrass(this.randomGenerator); + worldgenerator.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, DEAD_BUSH); + for (j = 0; doGen && j < this.deadBushPerChunk; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) * 2); + (new WorldGenDeadBush(Blocks.deadbush)).generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LILYPAD); + for (j = 0; doGen && j < this.waterlilyPerChunk; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + + for (i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) * 2); i1 > 0 + && this.currentWorld.isAirBlock(k, i1 - 1, l); --i1) { + ; + } + + this.waterlilyGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SHROOM); + for (j = 0; doGen && j < this.mushroomsPerChunk; ++j) { + if (this.randomGenerator.nextInt(4) == 0) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = this.currentWorld.getHeightValue(k, l); + this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + if (this.randomGenerator.nextInt(8) == 0) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + } + + if (doGen && this.randomGenerator.nextInt(4) == 0) { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + l = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(j, k) * 2); + this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, j, l, k); + } + + if (doGen && this.randomGenerator.nextInt(8) == 0) { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + l = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(j, k) * 2); + this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, j, l, k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, REED); + for (j = 0; doGen && j < this.reedsPerChunk; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + for (j = 0; doGen && j < 10; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, PUMPKIN); + if (doGen && this.randomGenerator.nextInt(32) == 0) { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + l = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(j, k) * 2); + (new WorldGenPumpkin()).generate(this.currentWorld, this.randomGenerator, j, l, k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CACTUS); + for (j = 0; doGen && j < this.cactiPerChunk; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = this.randomGenerator.nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.cactusGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LAKE); + if (doGen && this.generateLakes) { + for (j = 0; j < 50; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(248) + 8); + i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + (new WorldGenLiquids(Blocks.flowing_water)).generate(this.currentWorld, this.randomGenerator, k, l, i1); + } + + for (j = 0; j < 20; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(this.randomGenerator.nextInt(240) + 8) + 8); + i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + (new WorldGenLiquids(Blocks.flowing_lava)).generate(this.currentWorld, this.randomGenerator, k, l, i1); + } + } + + MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); + } + } +} From a5803b132073d85adda3eacbe7665f2fb0799421 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 27 May 2014 20:22:33 +0200 Subject: [PATCH 02/10] Add cucumbers --- .../universe_factory/minecraft/test/Test.java | 29 +++++++++++++++++++ .../assets/neoraider_test/lang/en_US.lang | 4 +++ 2 files changed, 33 insertions(+) diff --git a/java/net/universe_factory/minecraft/test/Test.java b/java/net/universe_factory/minecraft/test/Test.java index 32566a9..1cb1b2b 100644 --- a/java/net/universe_factory/minecraft/test/Test.java +++ b/java/net/universe_factory/minecraft/test/Test.java @@ -95,6 +95,31 @@ public class Test { .setUnlocalizedName("seedsSalad"); public static final Item salad = new ItemFood(3, 0.8f, false).setTextureName(MODID + ":salad").setUnlocalizedName("salad"); + public static final GenericCrops cucumberField = new GenericCrops() { + @Override + public String getName() { + return "cucumber"; + } + + @Override + public Item itemCrops() { + return cucumber; + } + + @Override + public Item itemSeeds() { + return cucumberSeeds; + } + + @Override + public int getRenderType() { + return 1; + } + }; + public static final Item cucumberSeeds = new ItemSeeds(cucumberField, Blocks.farmland).setTextureName(MODID + ":seeds_cucumber").setUnlocalizedName( + "seedsCucumber"); + public static final Item cucumber = new ItemFood(4, 0.4f, false).setTextureName(MODID + ":cucumber").setUnlocalizedName("cucumber"); + public static final ExtensibleBiomeDecorator biomeDecorator = new ExtensibleBiomeDecorator(); @EventHandler @@ -108,6 +133,10 @@ public class Test { GameRegistry.registerItem(salad, "salad"); GameRegistry.registerBlock(saladField, null, "salad"); + GameRegistry.registerItem(cucumberSeeds, "seeds_cucumber"); + GameRegistry.registerItem(cucumber, "cucumber"); + GameRegistry.registerBlock(cucumberField, null, "cucumber"); + biomeDecorator.registerTree(new ExtensibleBiomeDecorator.Tree() { @Override public Entry replaceTree(World world, BiomeGenBase biome, Random random, int x, int y, int z, diff --git a/resources/assets/neoraider_test/lang/en_US.lang b/resources/assets/neoraider_test/lang/en_US.lang index f7ed057..93e78a9 100644 --- a/resources/assets/neoraider_test/lang/en_US.lang +++ b/resources/assets/neoraider_test/lang/en_US.lang @@ -10,3 +10,7 @@ tile.stairsWoodCherry.name=Cherry Tree Wood Stairs item.salad.name=Salad item.seedsSalad.name=Salad Seeds tile.salad.name=Salad + +item.cucumber.name=Cucumber +item.seedsCucumber.name=Cucumber Seeds +tile.cucumber.name=Cucumber From 0b3e9e6ffe4104ed910636600869b047e0860dfc Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 28 May 2014 02:36:56 +0200 Subject: [PATCH 03/10] Proper big trees --- .../universe_factory/minecraft/test/Test.java | 13 +- .../minecraft/test/generic/GenericWood.java | 4 +- .../test/generic/WorldGenGenericBigTree.java | 442 ++++++++++++++++++ .../test/generic/WorldGenGenericTrees.java | 19 +- 4 files changed, 454 insertions(+), 24 deletions(-) create mode 100644 java/net/universe_factory/minecraft/test/generic/WorldGenGenericBigTree.java diff --git a/java/net/universe_factory/minecraft/test/Test.java b/java/net/universe_factory/minecraft/test/Test.java index 1cb1b2b..22adc1d 100644 --- a/java/net/universe_factory/minecraft/test/Test.java +++ b/java/net/universe_factory/minecraft/test/Test.java @@ -13,11 +13,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.feature.WorldGenAbstractTree; +import net.minecraft.world.gen.feature.WorldGenBigTree; import net.minecraft.world.gen.feature.WorldGenTrees; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.terraingen.BiomeEvent.CreateDecorator; import net.universe_factory.minecraft.test.generic.GenericCrops; import net.universe_factory.minecraft.test.generic.GenericWood; +import net.universe_factory.minecraft.test.generic.WorldGenGenericBigTree; import net.universe_factory.minecraft.test.generic.WorldGenGenericTrees; import net.universe_factory.minecraft.test.world.ExtensibleBiomeDecorator; import cpw.mods.fml.common.Mod; @@ -67,8 +69,8 @@ public class Test { } }; - WorldGenGenericTrees cherryTreeGenerator = WorldGenGenericTrees.newInstance(false, false, cherryTree); - WorldGenGenericTrees cherryTreeGeneratorBig = WorldGenGenericTrees.newInstance(false, true, cherryTree); + WorldGenGenericTrees cherryTreeGenerator = new WorldGenGenericTrees(false, cherryTree); + WorldGenGenericBigTree cherryTreeGeneratorBig = new WorldGenGenericBigTree(false, cherryTree); public static final GenericCrops saladField = new GenericCrops() { @Override @@ -141,12 +143,13 @@ public class Test { @Override public Entry replaceTree(World world, BiomeGenBase biome, Random random, int x, int y, int z, WorldGenAbstractTree orig) { - if (!(orig instanceof WorldGenTrees) || biome.getTempCategory() != BiomeGenBase.TempCategory.MEDIUM) + if (!(orig instanceof WorldGenTrees || orig instanceof WorldGenBigTree) + || biome.getTempCategory() != BiomeGenBase.TempCategory.MEDIUM) return null; - WorldGenAbstractTree generator = (random.nextInt(3) == 0) ? cherryTreeGenerator : cherryTreeGeneratorBig; + WorldGenAbstractTree generator = (random.nextInt(3) == 0) ? cherryTreeGeneratorBig : cherryTreeGenerator; - return new AbstractMap.SimpleEntry(generator, 0.5f); + return new AbstractMap.SimpleEntry(generator, 0.3f); } }); } diff --git a/java/net/universe_factory/minecraft/test/generic/GenericWood.java b/java/net/universe_factory/minecraft/test/generic/GenericWood.java index 6a04729..da34b74 100644 --- a/java/net/universe_factory/minecraft/test/generic/GenericWood.java +++ b/java/net/universe_factory/minecraft/test/generic/GenericWood.java @@ -229,8 +229,8 @@ public abstract class GenericWood { } private class Sapling extends BlockSapling { - WorldGenerator generator = WorldGenGenericTrees.newInstance(true, false, GenericWood.this); - WorldGenerator generatorBig = WorldGenGenericTrees.newInstance(true, true, GenericWood.this); + WorldGenerator generator = new WorldGenGenericTrees(true, GenericWood.this); + WorldGenerator generatorBig = new WorldGenGenericBigTree(true, GenericWood.this); public Sapling() { setBlockName("sapling" + getName()); diff --git a/java/net/universe_factory/minecraft/test/generic/WorldGenGenericBigTree.java b/java/net/universe_factory/minecraft/test/generic/WorldGenGenericBigTree.java new file mode 100644 index 0000000..cebdf6e --- /dev/null +++ b/java/net/universe_factory/minecraft/test/generic/WorldGenGenericBigTree.java @@ -0,0 +1,442 @@ +package net.universe_factory.minecraft.test.generic; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockSapling; +import net.minecraft.init.Blocks; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenAbstractTree; +import net.minecraftforge.common.util.ForgeDirection; + +public class WorldGenGenericBigTree extends WorldGenAbstractTree { + private final GenericWood genericWood; + + public WorldGenGenericBigTree(boolean notify, GenericWood genericWood) { + super(notify); + + this.genericWood = genericWood; + } + + /** + * Contains three sets of two values that provide complimentary indices + * for a given 'major' index - 1 and 2 for 0, 0 and 2 for 1, and 0 and 1 + * for 2. + */ + static final byte[] otherCoordPairs = new byte[] { (byte) 2, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 1 }; + /** random seed for GenBigTree */ + Random rand = new Random(); + /** Reference to the World object. */ + World worldObj; + int[] basePos = new int[] { 0, 0, 0 }; + int heightLimit; + int height; + double heightAttenuation = 0.618D; + double branchDensity = 1.0D; + double branchSlope = 0.381D; + double scaleWidth = 1.0D; + double leafDensity = 1.0D; + /** + * Currently always 1, can be set to 2 in the class constructor to + * generate a double-sized tree trunk for big trees. + */ + int trunkSize = 1; + /** + * Sets the limit of the random value used to initialize the height + * limit. + */ + int heightLimitLimit = 12; + /** + * Sets the distance limit for how far away the generator will populate + * leaves from the base leaf node. + */ + int leafDistanceLimit = 4; + /** Contains a list of a points at which to generate groups of leaves. */ + int[][] leafNodes; + + /** + * Generates a list of leaf nodes for the tree, to be populated by + * generateLeaves. + */ + void generateLeafNodeList() { + this.height = (int) ((double) this.heightLimit * this.heightAttenuation); + + if (this.height >= this.heightLimit) { + this.height = this.heightLimit - 1; + } + + int i = (int) (1.382D + Math.pow(this.leafDensity * (double) this.heightLimit / 13.0D, 2.0D)); + + if (i < 1) { + i = 1; + } + + int[][] aint = new int[i * this.heightLimit][4]; + int j = this.basePos[1] + this.heightLimit - this.leafDistanceLimit; + int k = 1; + int l = this.basePos[1] + this.height; + int i1 = j - this.basePos[1]; + aint[0][0] = this.basePos[0]; + aint[0][1] = j; + aint[0][2] = this.basePos[2]; + aint[0][3] = l; + --j; + + while (i1 >= 0) { + int j1 = 0; + float f = this.layerSize(i1); + + if (f < 0.0F) { + --j; + --i1; + } else { + for (double d0 = 0.5D; j1 < i; ++j1) { + double d1 = this.scaleWidth * (double) f * ((double) this.rand.nextFloat() + 0.328D); + double d2 = (double) this.rand.nextFloat() * 2.0D * Math.PI; + int k1 = MathHelper.floor_double(d1 * Math.sin(d2) + (double) this.basePos[0] + d0); + int l1 = MathHelper.floor_double(d1 * Math.cos(d2) + (double) this.basePos[2] + d0); + int[] aint1 = new int[] { k1, j, l1 }; + int[] aint2 = new int[] { k1, j + this.leafDistanceLimit, l1 }; + + if (this.checkBlockLine(aint1, aint2) == -1) { + int[] aint3 = new int[] { this.basePos[0], this.basePos[1], this.basePos[2] }; + double d3 = Math.sqrt(Math.pow((double) Math.abs(this.basePos[0] - aint1[0]), 2.0D) + + Math.pow((double) Math.abs(this.basePos[2] - aint1[2]), 2.0D)); + double d4 = d3 * this.branchSlope; + + if ((double) aint1[1] - d4 > (double) l) { + aint3[1] = l; + } else { + aint3[1] = (int) ((double) aint1[1] - d4); + } + + if (this.checkBlockLine(aint3, aint1) == -1) { + aint[k][0] = k1; + aint[k][1] = j; + aint[k][2] = l1; + aint[k][3] = aint3[1]; + ++k; + } + } + } + + --j; + --i1; + } + } + + this.leafNodes = new int[k][4]; + System.arraycopy(aint, 0, this.leafNodes, 0, k); + } + + void func_150529_a(int p_150529_1_, int p_150529_2_, int p_150529_3_, float p_150529_4_, byte p_150529_5_, Block p_150529_6_) { + int l = (int) ((double) p_150529_4_ + 0.618D); + byte b1 = otherCoordPairs[p_150529_5_]; + byte b2 = otherCoordPairs[p_150529_5_ + 3]; + int[] aint = new int[] { p_150529_1_, p_150529_2_, p_150529_3_ }; + int[] aint1 = new int[] { 0, 0, 0 }; + int i1 = -l; + int j1 = -l; + + for (aint1[p_150529_5_] = aint[p_150529_5_]; i1 <= l; ++i1) { + aint1[b1] = aint[b1] + i1; + j1 = -l; + + while (j1 <= l) { + double d0 = Math.pow((double) Math.abs(i1) + 0.5D, 2.0D) + Math.pow((double) Math.abs(j1) + 0.5D, 2.0D); + + if (d0 > (double) (p_150529_4_ * p_150529_4_)) { + ++j1; + } else { + aint1[b2] = aint[b2] + j1; + Block block1 = this.worldObj.getBlock(aint1[0], aint1[1], aint1[2]); + + if (!block1.isAir(worldObj, aint1[0], aint1[1], aint1[2]) && !block1.isLeaves(worldObj, aint1[0], aint1[1], aint1[2])) { + ++j1; + } else { + this.setBlockAndNotifyAdequately(this.worldObj, aint1[0], aint1[1], aint1[2], p_150529_6_, 0); + ++j1; + } + } + } + } + } + + /** + * Gets the rough size of a layer of the tree. + */ + float layerSize(int par1) { + if ((double) par1 < (double) ((float) this.heightLimit) * 0.3D) { + return -1.618F; + } else { + float f = (float) this.heightLimit / 2.0F; + float f1 = (float) this.heightLimit / 2.0F - (float) par1; + float f2; + + if (f1 == 0.0F) { + f2 = f; + } else if (Math.abs(f1) >= f) { + f2 = 0.0F; + } else { + f2 = (float) Math.sqrt(Math.pow((double) Math.abs(f), 2.0D) - Math.pow((double) Math.abs(f1), 2.0D)); + } + + f2 *= 0.5F; + return f2; + } + } + + float leafSize(int par1) { + return par1 >= 0 && par1 < this.leafDistanceLimit ? (par1 != 0 && par1 != this.leafDistanceLimit - 1 ? 3.0F : 2.0F) : -1.0F; + } + + /** + * Generates the leaves surrounding an individual entry in the leafNodes + * list. + */ + void generateLeafNode(int par1, int par2, int par3) { + int l = par2; + + for (int i1 = par2 + this.leafDistanceLimit; l < i1; ++l) { + float f = this.leafSize(l - par2); + this.func_150529_a(par1, l, par3, f, (byte) 1, genericWood.leaves); + } + } + + void func_150530_a(int[] p_150530_1_, int[] p_150530_2_, Block p_150530_3_) { + int[] aint2 = new int[] { 0, 0, 0 }; + byte b0 = 0; + byte b1; + + for (b1 = 0; b0 < 3; ++b0) { + aint2[b0] = p_150530_2_[b0] - p_150530_1_[b0]; + + if (Math.abs(aint2[b0]) > Math.abs(aint2[b1])) { + b1 = b0; + } + } + + if (aint2[b1] != 0) { + byte b2 = otherCoordPairs[b1]; + byte b3 = otherCoordPairs[b1 + 3]; + byte b4; + + if (aint2[b1] > 0) { + b4 = 1; + } else { + b4 = -1; + } + + double d0 = (double) aint2[b2] / (double) aint2[b1]; + double d1 = (double) aint2[b3] / (double) aint2[b1]; + int[] aint3 = new int[] { 0, 0, 0 }; + int i = 0; + + for (int j = aint2[b1] + b4; i != j; i += b4) { + aint3[b1] = MathHelper.floor_double((double) (p_150530_1_[b1] + i) + 0.5D); + aint3[b2] = MathHelper.floor_double((double) p_150530_1_[b2] + (double) i * d0 + 0.5D); + aint3[b3] = MathHelper.floor_double((double) p_150530_1_[b3] + (double) i * d1 + 0.5D); + byte b5 = 0; + int k = Math.abs(aint3[0] - p_150530_1_[0]); + int l = Math.abs(aint3[2] - p_150530_1_[2]); + int i1 = Math.max(k, l); + + if (i1 > 0) { + if (k == i1) { + b5 = 4; + } else if (l == i1) { + b5 = 8; + } + } + + this.setBlockAndNotifyAdequately(this.worldObj, aint3[0], aint3[1], aint3[2], p_150530_3_, b5); + } + } + } + + /** + * Generates the leaf portion of the tree as specified by the leafNodes + * list. + */ + void generateLeaves() { + int i = 0; + + for (int j = this.leafNodes.length; i < j; ++i) { + int k = this.leafNodes[i][0]; + int l = this.leafNodes[i][1]; + int i1 = this.leafNodes[i][2]; + this.generateLeafNode(k, l, i1); + } + } + + /** + * Indicates whether or not a leaf node requires additional wood to be + * added to preserve integrity. + */ + boolean leafNodeNeedsBase(int par1) { + return (double) par1 >= (double) this.heightLimit * 0.2D; + } + + /** + * Places the trunk for the big tree that is being generated. Able to + * generate double-sized trunks by changing a field that is always 1 to + * 2. + */ + void generateTrunk() { + int i = this.basePos[0]; + int j = this.basePos[1]; + int k = this.basePos[1] + this.height; + int l = this.basePos[2]; + int[] aint = new int[] { i, j, l }; + int[] aint1 = new int[] { i, k, l }; + this.func_150530_a(aint, aint1, genericWood.log); + + if (this.trunkSize == 2) { + ++aint[0]; + ++aint1[0]; + this.func_150530_a(aint, aint1, genericWood.log); + ++aint[2]; + ++aint1[2]; + this.func_150530_a(aint, aint1, genericWood.log); + aint[0] += -1; + aint1[0] += -1; + this.func_150530_a(aint, aint1, genericWood.log); + } + } + + /** + * Generates additional wood blocks to fill out the bases of different + * leaf nodes that would otherwise degrade. + */ + void generateLeafNodeBases() { + int i = 0; + int j = this.leafNodes.length; + + for (int[] aint = new int[] { this.basePos[0], this.basePos[1], this.basePos[2] }; i < j; ++i) { + int[] aint1 = this.leafNodes[i]; + int[] aint2 = new int[] { aint1[0], aint1[1], aint1[2] }; + aint[1] = aint1[3]; + int k = aint[1] - this.basePos[1]; + + if (this.leafNodeNeedsBase(k)) { + this.func_150530_a(aint, aint2, genericWood.log); + } + } + } + + /** + * Checks a line of blocks in the world from the first coordinate to + * triplet to the second, returning the distance (in blocks) before a + * non-air, non-leaf block is encountered and/or the end is encountered. + */ + int checkBlockLine(int[] par1ArrayOfInteger, int[] par2ArrayOfInteger) { + int[] aint2 = new int[] { 0, 0, 0 }; + byte b0 = 0; + byte b1; + + for (b1 = 0; b0 < 3; ++b0) { + aint2[b0] = par2ArrayOfInteger[b0] - par1ArrayOfInteger[b0]; + + if (Math.abs(aint2[b0]) > Math.abs(aint2[b1])) { + b1 = b0; + } + } + + if (aint2[b1] == 0) { + return -1; + } else { + byte b2 = otherCoordPairs[b1]; + byte b3 = otherCoordPairs[b1 + 3]; + byte b4; + + if (aint2[b1] > 0) { + b4 = 1; + } else { + b4 = -1; + } + + double d0 = (double) aint2[b2] / (double) aint2[b1]; + double d1 = (double) aint2[b3] / (double) aint2[b1]; + int[] aint3 = new int[] { 0, 0, 0 }; + int i = 0; + int j; + + for (j = aint2[b1] + b4; i != j; i += b4) { + aint3[b1] = par1ArrayOfInteger[b1] + i; + aint3[b2] = MathHelper.floor_double((double) par1ArrayOfInteger[b2] + (double) i * d0); + aint3[b3] = MathHelper.floor_double((double) par1ArrayOfInteger[b3] + (double) i * d1); + Block block = this.worldObj.getBlock(aint3[0], aint3[1], aint3[2]); + + if (!this.isReplaceable(worldObj, aint3[0], aint3[1], aint3[2])) { + break; + } + } + + return i == j ? -1 : Math.abs(i); + } + } + + /** + * Returns a boolean indicating whether or not the current location for + * the tree, spanning basePos to to the height limit, is valid. + */ + boolean validTreeLocation() { + int[] aint = new int[] { this.basePos[0], this.basePos[1], this.basePos[2] }; + int[] aint1 = new int[] { this.basePos[0], this.basePos[1] + this.heightLimit - 1, this.basePos[2] }; + Block block = this.worldObj.getBlock(this.basePos[0], this.basePos[1] - 1, this.basePos[2]); + + boolean isSoil = block.canSustainPlant(worldObj, basePos[0], basePos[1] - 1, basePos[2], ForgeDirection.UP, (BlockSapling) Blocks.sapling); + if (!isSoil) { + return false; + } else { + int i = this.checkBlockLine(aint, aint1); + + if (i == -1) { + return true; + } else if (i < 6) { + return false; + } else { + this.heightLimit = i; + return true; + } + } + } + + /** + * Rescales the generator settings, only used in WorldGenBigTree + */ + public void setScale(double par1, double par3, double par5) { + this.heightLimitLimit = (int) (par1 * 12.0D); + + if (par1 > 0.5D) { + this.leafDistanceLimit = 5; + } + + this.scaleWidth = par3; + this.leafDensity = par5; + } + + public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) { + this.worldObj = par1World; + long l = par2Random.nextLong(); + this.rand.setSeed(l); + this.basePos[0] = par3; + this.basePos[1] = par4; + this.basePos[2] = par5; + + if (this.heightLimit == 0) { + this.heightLimit = 5 + this.rand.nextInt(this.heightLimitLimit); + } + + if (!this.validTreeLocation()) { + return false; + } else { + this.generateLeafNodeList(); + this.generateLeaves(); + this.generateTrunk(); + this.generateLeafNodeBases(); + return true; + } + } +} diff --git a/java/net/universe_factory/minecraft/test/generic/WorldGenGenericTrees.java b/java/net/universe_factory/minecraft/test/generic/WorldGenGenericTrees.java index 3726ef4..96a68fd 100644 --- a/java/net/universe_factory/minecraft/test/generic/WorldGenGenericTrees.java +++ b/java/net/universe_factory/minecraft/test/generic/WorldGenGenericTrees.java @@ -9,33 +9,18 @@ import net.minecraftforge.common.util.ForgeDirection; public class WorldGenGenericTrees extends WorldGenAbstractTree { private final GenericWood genericWood; - private final int minHeight; - private final boolean big; - public static WorldGenGenericTrees newInstance(boolean notify, boolean big, GenericWood genericWood) { - return new WorldGenGenericTrees(notify, big, genericWood, genericWood.getMinTreeHeight()); - } - - public static WorldGenGenericTrees newForestInstance(boolean notify, boolean big, GenericWood genericWood) { - return new WorldGenGenericTrees(notify, big, genericWood, 5); - } - - protected WorldGenGenericTrees(boolean notify, boolean big, GenericWood genericWood, int minHeight) { + public WorldGenGenericTrees(boolean notify, GenericWood genericWood) { super(notify); this.genericWood = genericWood; - this.minHeight = minHeight; - this.big = big; } @Override public boolean generate(World world, Random random, int x, int y, int z) { - int height = random.nextInt(3) + minHeight; + int height = random.nextInt(3) + genericWood.getMinTreeHeight(); boolean flag = true; - if (big) - height += random.nextInt(7); - if (y >= 1 && y + height + 1 <= 256) { byte b0; int k1; From 4100702536744e1eeebe010251a9e9c3ca195d26 Mon Sep 17 00:00:00 2001 From: kaulquake Date: Wed, 28 May 2014 22:38:39 +0200 Subject: [PATCH 04/10] raddish! --- .../textures/blocks/cucumber_stage_1.png | Bin 467 -> 470 bytes .../textures/blocks/cucumber_stage_2.png | Bin 462 -> 581 bytes .../textures/blocks/cucumber_stage_3.png | Bin 501 -> 671 bytes .../textures/blocks/raddish_stage_0.png | Bin 0 -> 173 bytes .../textures/blocks/raddish_stage_1.png | Bin 0 -> 276 bytes .../textures/blocks/raddish_stage_2.png | Bin 0 -> 461 bytes .../textures/blocks/raddish_stage_3.png | Bin 0 -> 501 bytes .../neoraider_test/textures/items/raddish.png | Bin 0 -> 537 bytes 8 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 resources/assets/neoraider_test/textures/blocks/raddish_stage_0.png create mode 100644 resources/assets/neoraider_test/textures/blocks/raddish_stage_1.png create mode 100644 resources/assets/neoraider_test/textures/blocks/raddish_stage_2.png create mode 100644 resources/assets/neoraider_test/textures/blocks/raddish_stage_3.png create mode 100644 resources/assets/neoraider_test/textures/items/raddish.png diff --git a/resources/assets/neoraider_test/textures/blocks/cucumber_stage_1.png b/resources/assets/neoraider_test/textures/blocks/cucumber_stage_1.png index be10fbddb170b59e0cc3d363ce533696879b734c..1056581cb7cdbd8a913a286ec854efa54fce8d96 100644 GIT binary patch delta 438 zcmV;n0ZIPT1J(nODt`+A!2kdr{&pDv000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2i^r76cRXn7IR4e00Co3L_t(I%k7Z8OF~f?#(y`xMQ|l)(4j9OL5LP1`hcP-Cu?r7 zqJJQ$hJpqOiil`)Y73HRiKd7Q8YFcHA`-+tD9Jud49e2FR)42Kx+X-m20hC;yyyI$ z_kCXY*B_B9Xcw-aU3~Q>eFq+h17<`00^mNT(qVO=zUG){@n~GhZzecf%iyw(u2|KyW>D+P402On&v>C@ gz>Ms@CHKkT9sA~aq7N`1JOBUy07*qoM6N<$f_quRb^rhX delta 435 zcmV;k0ZjhZ1JeVLDt~4Gw*W@4pEaTY000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2i^r65iugA!3O{U00Cf0L_t(I%k7ZOE5mUd$6r4-F%O5e8kQ-fl;p8pTqdPm+>~-s z4h|Zni! z@ke0y+l1Y36S+7kpD-jsEbLDSfR}59PIEU(Mq#|mq3Q~L)8KL|NxylR&2b<=Td@VF#a*7$VCHy2 z08BQ|W^H3WZGQ*gwl++JXzmg1ew(=Q%Die5Sgk$mxq<+kc6ik1ig+ae{*hZ%SNJK8 zAEk-b1<{+z2qg|EZ4hM6bUaj_V+hxyi|a`j$Q+E`XSGvDG_)3B($%nPJ(f~SC9c;U z4N5YFG0;R`)3CHV9gzZKF$tfMZw5|_TXH@JrL~n42`s?tiVVt8CGeI~=0@?k}1H}Z8Dt`+A!2kdr{&pDv000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2i^r76c#WSp+0{A00GiTL_t(I%f*t-YtwKT$3IEaEkx2rn_*-_1z%9edhk+3Dtg#| zFuV;t1!Q**de%Q+NAWOs5oFha=)s8xr{H0=Fm&K%tF)bwPJh#+FNukVkZ76H-h58K zm*?|+p5OER!T%0n)Wo@kxv2WFih0cBpd7GZJsg?Em@h@fd?^~KgW0>~biI7*1qnE< zc>p}U^LB`lW^PZX%J~DDaQ6CP05%p|Y0?>I2lM91WINP}q!$$c?21QNaHBU5Ht{~+oqv$2-fLo%RMewcoSILQrEH9-4t%FeNXR1yAluQ)YS<-J=+DK`N{zx2#D5h zyc{|M(&~1_i(UAAka|(Uu6P(FmF*`sVXMpQ{PEbKnSTLE!Nd^}z^`|hEa%XR3a#gD zezg01er%J;iez$GF6?eo7$4AB*+DNVOqO%_^-k;pK)5(;eq00CP`L_t(I%f*tvYQj(y#(#!bOc23{bWH|9K`4}tc6IOtoPB^k zLi-ZV(xGc-2ZvH<>Eu$dXepR19g0M2DCSbrrbEaz+COCL9e=<3{mwb}I~V@@WYQYj zXYJ5=aWMBy^4Sl1ryEczE&yKb)5d3VpT&ctN62km{S0ZnvU5r@Mi(S zUCVB}lL>c?KYt4_TLwl=-xL6tk5{tDa_ZxbRuaCtQCLoW3D3uyJH@l3aN>#pi-`}w zYe@KbalNG_y`C+iEhK|1SUEgfP^@Yax?ki0I6e%B8^#-vPbk%O3Ga41D85n1MsUH( z$$+;qa7QaVTQKMjGrPM^cJyqqmCv8wF@D)kclYb0 YU)6z|#8GYVPXGV_07*qoM6N<$g0?BWy8r+H diff --git a/resources/assets/neoraider_test/textures/blocks/cucumber_stage_3.png b/resources/assets/neoraider_test/textures/blocks/cucumber_stage_3.png index f4732c4cc1c63fa54838b2cc41b8dd035bf2a613..25152a3f30667e9256134d1a4ced7769cbe3b9dc 100644 GIT binary patch delta 640 zcmV-`0)PGW1D^$uDt`+A!2kdr{&pDv000SaNLh0L01FcU01FcV0GgZ_00007bV*G` z2i^r76c`sQD5jbK00JyYL_t(I%f*sSNK{c6hM#kpnY{DsEuB#rGp9iW86iP!F&hzt z0&%MZK_IlWW#C$H>B3DQL|a#_j0~DZMrmR&gEVeh0k|V)DeY0LVVl1wiNhW(jb$p^?R@^e;QEp~-HUH@`a|IS~io z*>uKX0abN)-uy0WT=V%+DiNDdtPX(IP7Nb%vOae}dtZZN(2(%4K6ikTHfinD00_nE zs6=cOfW&Z=xkhlbnc?7>*JS2T{V|AOMHU$J~0D zU@x1;NSkb}7|!z6ih+?f*~{kXzZ2td`Pi8$My3Ejr2pLL=!k4eC!ng>Hqy3{0aYcN z(mAm#qSrM?Yh()57KSFf<1q4-i~p&a#A(#3xDu#VUwPLHfj$7EKa3`t9EHg z201&jS$h5nug60+r8~mig|7gtrFQ5UXu}h7vA8Ya%%kmEyFF5)@b!l})$JHBIANu}tgD zdbUe_h{2gLS$wlWxm>~LRxnF$eC`sL>k8~|9{c24B00DwYL_t(I%f*sEF9Ts5$3J(DTu)LQWg&W7B^HV3W~`)()hlRX zF!cp^1tx>=3al0hqm4)`f~gN_C#Th3qW8pAAA{V}t3Ndu{C}ojzJH$IzX$$1jL$$} zYgxtl>F%ZR6BdV+BmuHT7l8ZY2H)WY`t?@YvjGT%B$csfRYIQcLM9g-Et*_(xIb<% zkxP-vScHCu*k=N`3l7<$OXzoy^+;Fy+<~k|gnox?(ZyYGdJh0JZrl2iRwbl<-PY#% zb(>Zt)aJ%*kAE`*A&I+)sPh_yn`K;e>kV= ztnbTi?5!$5YtDz(5v8(Wcn3SGdvSu4ugs5+@X#D%eonl_Ql^G@`Z$+2)#l2d)!ak# z726)cTv@{urLr;OL;&RHs(?>^uFC%QjqYH7`^HFe05eX6D3y(OWb3^N1UMa=00000 LNkvXXu0mjfVoB6q diff --git a/resources/assets/neoraider_test/textures/blocks/raddish_stage_0.png b/resources/assets/neoraider_test/textures/blocks/raddish_stage_0.png new file mode 100644 index 0000000000000000000000000000000000000000..746d354cc7e088458fe9d24acac7e24aa5729e50 GIT binary patch literal 173 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqtBeREtINc?Q$QgrPZ!4!i_^&o60D08L@tPJNZb4` zy+Y-~eAC%q?F+lUcO+`XY4@G7SK|vT_L1pc*w13XTAmQtu}qR7#9vJI&!<`6fu=Bc My85}Sb4q9e0Ia?;!vFvP literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/raddish_stage_1.png b/resources/assets/neoraider_test/textures/blocks/raddish_stage_1.png new file mode 100644 index 0000000000000000000000000000000000000000..634c1573abc5a4382af55504f1814ab2f772c7c2 GIT binary patch literal 276 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqtBeSX-qfh#^FX16o-U3d7N_4%*vNaxfyZ^f;{GlX zkCq~#=+wUGmNr3+%fU-}CS>FZu$^EMoT0WcNx;^%?&<$``%G#98lN Ra~J4X22WQ%mvv4FO#q8|YB>M^ literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/raddish_stage_2.png b/resources/assets/neoraider_test/textures/blocks/raddish_stage_2.png new file mode 100644 index 0000000000000000000000000000000000000000..aeaa9e4db14c4b06fa523dfac3de4524f0845430 GIT binary patch literal 461 zcmV;;0W$uHP)K3kkQ#+G_v+0a{5! zK~y-)?UB1q8&MF3zp-~PjxFIOh^=@7WP0-iNE9H^xgZ7Ic6k7Vcn24BNkMHXDcm4Y zv64$98al*Q7LhNJ9Alq_p@3c6fJCZPnd;1cncIQ?@o!_$j_qf(Z-aJhuL%b2*nV6e zyd_^n>HPEi{LWQ{ovVs{G{wqEX-?y%k9d^(t2KVD7J%VQfwNTryNM@~p)Z)+53%i` zXsG5IP5|Wh1L+7Fs%34veWTmA%&g5`CUW&W1TIoVpkstTp#z`R1w57o-#{MTDJ1&>s|Hx*2(a`7S7vDw#u=%B!X;SP75%!MPV+aRA00000NkvXXu0mjf Dwv@`v literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/raddish_stage_3.png b/resources/assets/neoraider_test/textures/blocks/raddish_stage_3.png new file mode 100644 index 0000000000000000000000000000000000000000..5dd6af1bf695970d255e229b5a453bff457dc9ca GIT binary patch literal 501 zcmVK5)eqE+p_=w0fI?H zK~y-)#gn^A13?sqzZrup7>TSRf`x_@ih`{OHew13FE8N(*sNIC2sV;Bg|MX$V7jy# zMGG4R1sl;qkk~|&IGSXS#Y{FAEd&csGv}O{|2r3U;or?WLB1vTe#mWi|L(m5m^Zx>~X;LU+4 z0=}(Ih|+AJ0K7FT{-}b^AyL(p*m014=(%>{Hq%YV6ya?EUY{WfP~IY#Q%Fo%APs0t zyT>=SdJEvXNLE0*%AaSTN1*;aI%UtO46Gtifa=Xays%BX2g(lE4Tu8N z+d$`h<`{T#BVhe*(|`RCI{;=MxOEpfgge`EY$M+R@hoiFO*a7yJ8|=z0j^vewsfkU zwy=^Ee9cMnoyK^L$wRx8o70M770L7sqRMq1Cacu)wGJ)o>9jnTN^%(lGVA-Yo=(eS rp&+H@KCJC3~fP?@50j5br zK~y-)m6E?pTTvK>pA$t*?xh7Gia{j_og@$_8Eh51IH{#{^)GOAa&d7`3NBgt7j&&l zY`PT-g^q%vHvZz?OG3n|IK+E$7IQ>>|7wHr}vJTPTZUGQOP|tzQCe+AYu z<1LZvv=3s&qe={cdFT#P5bpB*p&eAIx|ZQi8kX2`1o%B=F(bNP_sg zw+tBx)tl=f^J)xFdtl#>E!NsX6U0Um80jQmR#w&3`zj}!4Z6H8n&%2vd6;v3xLXY{ z!v&;XIip@Vs+RQC=5 z_<30+f4mb~x=3ZCD38Imu3_uilRZ&~>z_qiWsLMF+A0GC&bF@M)NdYj59;_&55xz7 bCt-j)>1n=v58+&000000NkvXXu0mjfUQplf literal 0 HcmV?d00001 From 3989b6b62250c1d0ba4f120b177ea2ba3eca093e Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 28 May 2014 23:13:45 +0200 Subject: [PATCH 05/10] Add raddish --- .../universe_factory/minecraft/test/Test.java | 28 +++++++++++++++++++ .../assets/neoraider_test/lang/en_US.lang | 3 ++ 2 files changed, 31 insertions(+) diff --git a/java/net/universe_factory/minecraft/test/Test.java b/java/net/universe_factory/minecraft/test/Test.java index 22adc1d..37704a8 100644 --- a/java/net/universe_factory/minecraft/test/Test.java +++ b/java/net/universe_factory/minecraft/test/Test.java @@ -8,6 +8,7 @@ import java.util.Random; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemSeedFood; import net.minecraft.item.ItemSeeds; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -122,6 +123,30 @@ public class Test { "seedsCucumber"); public static final Item cucumber = new ItemFood(4, 0.4f, false).setTextureName(MODID + ":cucumber").setUnlocalizedName("cucumber"); + public static final GenericCrops raddishField = new GenericCrops() { + @Override + public String getName() { + return "raddish"; + } + + @Override + public Item itemCrops() { + return raddish; + } + + @Override + public Item itemSeeds() { + return raddish; + } + + @Override + public int getRenderType() { + return 1; + } + }; + public static final Item raddish = new ItemSeedFood(4, 0.4f, raddishField, Blocks.farmland).setTextureName(MODID + ":raddish").setUnlocalizedName( + "raddish"); + public static final ExtensibleBiomeDecorator biomeDecorator = new ExtensibleBiomeDecorator(); @EventHandler @@ -139,6 +164,9 @@ public class Test { GameRegistry.registerItem(cucumber, "cucumber"); GameRegistry.registerBlock(cucumberField, null, "cucumber"); + GameRegistry.registerItem(raddish, "raddish"); + GameRegistry.registerBlock(raddishField, null, "raddish"); + biomeDecorator.registerTree(new ExtensibleBiomeDecorator.Tree() { @Override public Entry replaceTree(World world, BiomeGenBase biome, Random random, int x, int y, int z, diff --git a/resources/assets/neoraider_test/lang/en_US.lang b/resources/assets/neoraider_test/lang/en_US.lang index 93e78a9..c11b2d8 100644 --- a/resources/assets/neoraider_test/lang/en_US.lang +++ b/resources/assets/neoraider_test/lang/en_US.lang @@ -14,3 +14,6 @@ tile.salad.name=Salad item.cucumber.name=Cucumber item.seedsCucumber.name=Cucumber Seeds tile.cucumber.name=Cucumber + +item.raddish.name=Raddish +tile.raddish.name=Raddish From 0581f1c7b3825d3da8990a73ed6e4fb80aa06a8b Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 28 May 2014 23:50:05 +0200 Subject: [PATCH 06/10] Change raddish render type --- java/net/universe_factory/minecraft/test/Test.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/java/net/universe_factory/minecraft/test/Test.java b/java/net/universe_factory/minecraft/test/Test.java index 37704a8..b5f580b 100644 --- a/java/net/universe_factory/minecraft/test/Test.java +++ b/java/net/universe_factory/minecraft/test/Test.java @@ -138,11 +138,6 @@ public class Test { public Item itemSeeds() { return raddish; } - - @Override - public int getRenderType() { - return 1; - } }; public static final Item raddish = new ItemSeedFood(4, 0.4f, raddishField, Blocks.farmland).setTextureName(MODID + ":raddish").setUnlocalizedName( "raddish"); From e002973c2edb0dfa862d4bfbda42d25a65b2ca44 Mon Sep 17 00:00:00 2001 From: kaulquake Date: Wed, 9 Jul 2014 17:38:08 +0200 Subject: [PATCH 07/10] added schnitzeltree textures --- .../textures/blocks/leaves_schnitzel.png | Bin 0 -> 831 bytes .../textures/blocks/leaves_schnitzel_opaque.png | Bin 0 -> 831 bytes .../textures/blocks/log_schnitzel.png | Bin 0 -> 835 bytes .../textures/blocks/log_schnitzel_top.png | Bin 0 -> 858 bytes .../textures/blocks/planks_schnitzel.png | Bin 0 -> 508 bytes .../textures/blocks/sapling_schnitzel.png | Bin 0 -> 601 bytes 6 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 resources/assets/neoraider_test/textures/blocks/leaves_schnitzel.png create mode 100644 resources/assets/neoraider_test/textures/blocks/leaves_schnitzel_opaque.png create mode 100644 resources/assets/neoraider_test/textures/blocks/log_schnitzel.png create mode 100644 resources/assets/neoraider_test/textures/blocks/log_schnitzel_top.png create mode 100644 resources/assets/neoraider_test/textures/blocks/planks_schnitzel.png create mode 100644 resources/assets/neoraider_test/textures/blocks/sapling_schnitzel.png diff --git a/resources/assets/neoraider_test/textures/blocks/leaves_schnitzel.png b/resources/assets/neoraider_test/textures/blocks/leaves_schnitzel.png new file mode 100644 index 0000000000000000000000000000000000000000..82050344c54bfefb82b52acef11d947b218c7d0d GIT binary patch literal 831 zcmV-F1Hk-=P)-7lefn7mEpzNtg&X!lf%WE?q97 zyAj!f_@79SXt1o!jCInj#bz{=tz$bK+cD>~bul}!c<#RBd)_DS?|onC@S=HzjA;@I z20&FYB2h$fG2P$Bs9NF#097T{dJBx-_^Q3&Du=8_TP%*qm?ohE^~5@RAelt*cxIW6 zF^%q)tN4x_WMV=mC(Gmq`e}>B>HGE_Idq_&?wj|S)TaQ*rPEgGOhJF31_s^{sIElJ znM2#>A++o`8Pi01zu8;pefN=dYgW?xX_y~F8G0QHNE-&r6or%f_JB4@eq@9}Bp&y@ z<<+E)kRTKcAl-913IM)+yCAFa{O%*{-nCp#zF~o;ka8GD>6#>BOhvDhCzYu41uH_0t zrR8kfzMb7?&fu`w5VtR!C)^&!s|cc9ake%#V9Vz)#x!dxIb8>!@lYcxWtlt2j#)+J zs$eZ7la|3qByjuIPQO(Z`VzGCy#-){%?7H`&ZfE=IE&Tbd4omW8ihc+vS9*)$MV@?Y~H z63tILc=C0an67jB`VA(RI+-tl5s6ygH&w64U%wY=VC$yBsh2(Y?Dqe*?YQa&ps0Tk z0Dt{nj6}j>mCF|pGlXNhPE6NlnX7`e)>ZmzH)13b7GzWvfIr>ONWcp6*2e$<002ov JPDHLkV1fV=d*1*6 literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/leaves_schnitzel_opaque.png b/resources/assets/neoraider_test/textures/blocks/leaves_schnitzel_opaque.png new file mode 100644 index 0000000000000000000000000000000000000000..d2925f8c57445ec2820459b638097eacaa36f12c GIT binary patch literal 831 zcmV-F1Hk-=P)-7lefn7mEpzNtg&X!lf%WE?q97 zyAj!f_@79SXt1o!jCInj#bz{=tz$bK+cD>~bul}!c<#RBd)_DS?|onC@S=HzjA;@I z20&FYB2h$fG2P$Bs9NF#097T{dJBx-_^Q3&Du=8_TP%*qm?ohE^~5@RAelt*cxIW6 zF^%q)tN4x_WMV=mC(Gmq`e}>B>HGE_Idq_&?wj|S)TaQ*rPEgGOhJF31_s^{sIElJ znM2#>A++o`8Pi01zu8;pefN=dYgW?xX_y~F8G0QHNE-&r6or%f_JB4@eq@9}Bp&y@ z<<+E)kRTKcAl-913IM)+yCAFa{O%*{-nCp#zF~o;ka8GD>6#>BOhvDhCzYu41uH_0t zrR8kfzMb7?&fu`w5VtR!C)^&!s|cc9ake%#V9Vz)#x!dxIb8>!@lYcxWtlt2j#)+J zs$eZ7la|3qByjuIPQO(Z`VzGCy#-){%?7H`&ZfE=IE&Tbd4omW8ihc+vS9*)$MV@?Y~H z63tILc=C0an67jB`VA(RI+-tl5s6ygH&w64U%wY=VC$yBsh2(Y?Dqe*?YQa&ps0Tk z0Dt{nj6}j>mCF|pGlXNhPE6NlnX7`e)>ZmzH)13b7GzWvfIr>ONWcp6*2e$<002ov JPDHLkV1fnsd^rFB literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/log_schnitzel.png b/resources/assets/neoraider_test/textures/blocks/log_schnitzel.png new file mode 100644 index 0000000000000000000000000000000000000000..0ca0e867a811be3533894402e30335b63da0bebe GIT binary patch literal 835 zcmV-J1HAl+P)b>g+&TU z3M7PnIHArbV|!+7&&<6n3^|*#I*%T`=T)a)-*rdVHJhJ3#r<)JolZ%M35&j<9=-=h zeFy^vgOuLg7Gx7_J_6w2yhOe`9+3nF034i+D;A;%i4&#=FR{~{!5}5}HTEjS<|Fju zPdORaJZyW&=R2!(V~6|wkpD-yn!$OBSB+5G&}ka#dJ4{>w%)~+8C3<+ZX=`7@aFLC zRmN351EAfI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0;py2(@{2*6092LZ$azYo;Zkp9c<|HT&wC%4?A$@xwI0000|W zK~y-)#gn~j6LA>FKX-|}^P){+46!D*1;MFXQ3_Suv>-*0s#E`slEqB|(xK?wDa4_* zT~rVe0-+Z=h~P_6N<&G&yr)fKnz!@reom2yNfj5r(=&X(AD$N;_}`Lxg$T!7hp87w zjbZ_S(}8oGDP$dzuG@b_I#{?bjCx&E*Vcs4bQ!nAE1H*bW#wcEJw-NiT`f=XpD zU~(%VC3Rgs>G$ItAE)ysjLSPlkG*Wvc6A5O*;hEpg*pselVtRG8rTTnY zw^qZ<<-xLW?e1YXo#b~uF}anH2JQghYO5uwwOTOqFoIktbR8ewqbf={`83K%r!Dt~ z2X@e}!$-G;>b=E5@iiA7Y!37~j{_KHiW9G*q|c^@dX5FOS}nMual8{bFx2w{F3ZgQmG$1x00000NkvXXu0mjf>l6|U literal 0 HcmV?d00001 From 5fffbad158f15c4f7b87a08dfe7bb52f7a9d1f4b Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 27 Jul 2014 16:57:32 +0200 Subject: [PATCH 08/10] Add Schnitzel trees --- .../universe_factory/minecraft/test/Test.java | 36 +++++++++++++++++++ .../assets/neoraider_test/lang/en_US.lang | 7 ++++ 2 files changed, 43 insertions(+) diff --git a/java/net/universe_factory/minecraft/test/Test.java b/java/net/universe_factory/minecraft/test/Test.java index b5f580b..999475c 100644 --- a/java/net/universe_factory/minecraft/test/Test.java +++ b/java/net/universe_factory/minecraft/test/Test.java @@ -6,6 +6,7 @@ import java.util.Map.Entry; import java.util.Random; import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemSeedFood; @@ -70,6 +71,39 @@ public class Test { } }; + public static final GenericWood schnitzelTree = new GenericWood() { + @Override + public String getName() { + return "Schnitzel"; + } + + @Override + public int getMinTreeHeight() { + return 4; + } + + @Override + public ArrayList getDrops(World world, int x, int y, int z, int meta, int fortune) { + ArrayList ret = new ArrayList(); + + int chance = 30; + + if (fortune > 0) { + chance -= 2 << fortune; + + if (chance < 5) + chance = 5; + } + + if (world.rand.nextInt(chance) == 0) { + final Item[] drops = { Items.beef, Items.beef, Items.chicken, Items.chicken, Items.porkchop, Items.porkchop, Items.leather }; + ret.add(new ItemStack(drops[world.rand.nextInt(drops.length)], 1)); + } + + return ret; + } + }; + WorldGenGenericTrees cherryTreeGenerator = new WorldGenGenericTrees(false, cherryTree); WorldGenGenericBigTree cherryTreeGeneratorBig = new WorldGenGenericBigTree(false, cherryTree); @@ -151,6 +185,8 @@ public class Test { GameRegistry.registerItem(cherries, "cherries"); cherryTree.register(); + schnitzelTree.register(); + GameRegistry.registerItem(saladSeeds, "seeds_salad"); GameRegistry.registerItem(salad, "salad"); GameRegistry.registerBlock(saladField, null, "salad"); diff --git a/resources/assets/neoraider_test/lang/en_US.lang b/resources/assets/neoraider_test/lang/en_US.lang index c11b2d8..d4f27b0 100644 --- a/resources/assets/neoraider_test/lang/en_US.lang +++ b/resources/assets/neoraider_test/lang/en_US.lang @@ -7,6 +7,13 @@ tile.saplingCherry.name=Cherry Tree Sapling tile.woodSlabCherry.name=Cherry Tree Wood Slab tile.stairsWoodCherry.name=Cherry Tree Wood Stairs +tile.woodSchnitzel.name=Schnitzel Tree Wood Planks +tile.logSchnitzel.name=Schnitzel Tree Wood +tile.leavesSchnitzel.name=Schnitzel Tree Leaves +tile.saplingSchnitzel.name=Schnitzel Tree Sapling +tile.woodSlabSchnitzel.name=Schnitzel Tree Wood Slab +tile.stairsWoodSchnitzel.name=Schnitzel Tree Wood Stairs + item.salad.name=Salad item.seedsSalad.name=Salad Seeds tile.salad.name=Salad From ea34f55a12342f8118b99d6c846c5718208664be Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 14 Sep 2014 15:06:43 +0200 Subject: [PATCH 09/10] Add glowfoo --- .../universe_factory/minecraft/test/Test.java | 13 ++++ .../minecraft/test/blocks/BlockGlowfoo.java | 56 ++++++++++++++++++ .../assets/neoraider_test/lang/en_US.lang | 17 ++++++ .../textures/blocks/glowfoo.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo.xcf | Bin 0 -> 2189 bytes .../textures/blocks/glowfoo_black.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo_black.xcf | Bin 0 -> 2189 bytes .../textures/blocks/glowfoo_blue.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo_blue.xcf | Bin 0 -> 2189 bytes .../textures/blocks/glowfoo_brown.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo_brown.xcf | Bin 0 -> 2189 bytes .../textures/blocks/glowfoo_cyan.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo_cyan.xcf | Bin 0 -> 2189 bytes .../textures/blocks/glowfoo_gray.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo_gray.xcf | Bin 0 -> 2189 bytes .../textures/blocks/glowfoo_green.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo_green.xcf | Bin 0 -> 2189 bytes .../textures/blocks/glowfoo_light_blue.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo_light_blue.xcf | Bin 0 -> 2189 bytes .../textures/blocks/glowfoo_lime.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo_lime.xcf | Bin 0 -> 2189 bytes .../textures/blocks/glowfoo_magenta.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo_magenta.xcf | Bin 0 -> 2189 bytes .../textures/blocks/glowfoo_orange.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo_orange.xcf | Bin 0 -> 2189 bytes .../textures/blocks/glowfoo_pink.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo_pink.xcf | Bin 0 -> 2189 bytes .../textures/blocks/glowfoo_purple.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo_purple.xcf | Bin 0 -> 2189 bytes .../textures/blocks/glowfoo_red.png | Bin 0 -> 644 bytes .../textures/blocks/glowfoo_red.xcf | Bin 0 -> 3522 bytes .../textures/blocks/glowfoo_silver.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo_silver.xcf | Bin 0 -> 2189 bytes .../textures/blocks/glowfoo_white.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo_white.xcf | Bin 0 -> 2189 bytes .../textures/blocks/glowfoo_yellow.png | Bin 0 -> 370 bytes .../textures/blocks/glowfoo_yellow.xcf | Bin 0 -> 2189 bytes 37 files changed, 86 insertions(+) create mode 100644 java/net/universe_factory/minecraft/test/blocks/BlockGlowfoo.java create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_black.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_black.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_blue.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_blue.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_brown.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_brown.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_cyan.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_cyan.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_gray.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_gray.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_green.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_green.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_light_blue.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_light_blue.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_lime.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_lime.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_magenta.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_magenta.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_orange.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_orange.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_pink.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_pink.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_purple.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_purple.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_red.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_red.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_silver.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_silver.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_white.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_white.xcf create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_yellow.png create mode 100644 resources/assets/neoraider_test/textures/blocks/glowfoo_yellow.xcf diff --git a/java/net/universe_factory/minecraft/test/Test.java b/java/net/universe_factory/minecraft/test/Test.java index 999475c..3fad78e 100644 --- a/java/net/universe_factory/minecraft/test/Test.java +++ b/java/net/universe_factory/minecraft/test/Test.java @@ -5,9 +5,11 @@ import java.util.ArrayList; import java.util.Map.Entry; import java.util.Random; +import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; +import net.minecraft.item.ItemCloth; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemSeedFood; import net.minecraft.item.ItemSeeds; @@ -19,6 +21,7 @@ import net.minecraft.world.gen.feature.WorldGenBigTree; import net.minecraft.world.gen.feature.WorldGenTrees; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.terraingen.BiomeEvent.CreateDecorator; +import net.universe_factory.minecraft.test.blocks.BlockGlowfoo; import net.universe_factory.minecraft.test.generic.GenericCrops; import net.universe_factory.minecraft.test.generic.GenericWood; import net.universe_factory.minecraft.test.generic.WorldGenGenericBigTree; @@ -176,6 +179,9 @@ public class Test { public static final Item raddish = new ItemSeedFood(4, 0.4f, raddishField, Blocks.farmland).setTextureName(MODID + ":raddish").setUnlocalizedName( "raddish"); + public static final Block glowfooBlock = new BlockGlowfoo(); + public static final Item glowfoo = new ItemCloth(glowfooBlock); + public static final ExtensibleBiomeDecorator biomeDecorator = new ExtensibleBiomeDecorator(); @EventHandler @@ -198,6 +204,13 @@ public class Test { GameRegistry.registerItem(raddish, "raddish"); GameRegistry.registerBlock(raddishField, null, "raddish"); + GameRegistry.registerBlock(glowfooBlock, null, "glowfoo"); + GameRegistry.registerItem(glowfoo, "glowfoo"); + + for (int i = 0; i < 16; i++) + GameRegistry.addRecipe(new ItemStack(glowfoo, 4, i), "###", "#X#", "###", '#', new ItemStack(Blocks.stained_glass_pane, 1, i), 'X', + Blocks.redstone_block); + biomeDecorator.registerTree(new ExtensibleBiomeDecorator.Tree() { @Override public Entry replaceTree(World world, BiomeGenBase biome, Random random, int x, int y, int z, diff --git a/java/net/universe_factory/minecraft/test/blocks/BlockGlowfoo.java b/java/net/universe_factory/minecraft/test/blocks/BlockGlowfoo.java new file mode 100644 index 0000000..7e88d27 --- /dev/null +++ b/java/net/universe_factory/minecraft/test/blocks/BlockGlowfoo.java @@ -0,0 +1,56 @@ +package net.universe_factory.minecraft.test.blocks; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemDye; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.universe_factory.minecraft.test.Test; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockGlowfoo extends Block { + private static final IIcon[] textures = new IIcon[16]; + + public BlockGlowfoo() { + super(Material.glass); + + setHardness(0.3F); + setStepSound(soundTypeGlass); + setLightLevel(1.0F); + setCreativeTab(CreativeTabs.tabDecorations); + setBlockName("glowfoo"); + setBlockTextureName(Test.MODID + ":glowfoo"); + } + + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) { + for (int i = 0; i < textures.length; i++) + list.add(new ItemStack(item, 1, i)); + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) { + return textures[meta % textures.length]; + } + + @SideOnly(Side.CLIENT) + private static int negateMeta(int meta) { + return ~meta & 15; + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { + for (int i = 0; i < textures.length; i++) + textures[i] = iconRegister.registerIcon(this.getTextureName() + "_" + ItemDye.field_150921_b[negateMeta(i)]); + } + + public int damageDropped(int meta) { + return meta; + } +} diff --git a/resources/assets/neoraider_test/lang/en_US.lang b/resources/assets/neoraider_test/lang/en_US.lang index d4f27b0..ac39b16 100644 --- a/resources/assets/neoraider_test/lang/en_US.lang +++ b/resources/assets/neoraider_test/lang/en_US.lang @@ -24,3 +24,20 @@ tile.cucumber.name=Cucumber item.raddish.name=Raddish tile.raddish.name=Raddish + +tile.glowfoo.black.name=Black Light +tile.glowfoo.red.name=Red Light +tile.glowfoo.green.name=Green Light +tile.glowfoo.brown.name=Brown Light +tile.glowfoo.blue.name=Blue Light +tile.glowfoo.purple.name=Purple Light +tile.glowfoo.cyan.name=Cyan Light +tile.glowfoo.silver.name=Light Gray Light +tile.glowfoo.gray.name=Gray Light +tile.glowfoo.pink.name=Pink Light +tile.glowfoo.lime.name=Lime Light +tile.glowfoo.yellow.name=Yellow Light +tile.glowfoo.lightBlue.name=Light Blue Light +tile.glowfoo.magenta.name=Magenta Light +tile.glowfoo.orange.name=Orange Light +tile.glowfoo.white.name=White Light \ No newline at end of file diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo.png b/resources/assets/neoraider_test/textures/blocks/glowfoo.png new file mode 100644 index 0000000000000000000000000000000000000000..006ada88652895e2ca6e385ca7b91dc31f874b7a GIT binary patch literal 370 zcmV-&0ge8NP)h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}Uzxc2(cqV3x@(*T80LCJ z{zkCgKrNWdv#=Aa=k``T~BkHud)3?y4mmrb`qzNfoPxWbF> zt}^8c1{~|e$r!{s=(f*h%)?XBuZ30OA9NjsG6BEO8AlFQP;lu`OKWS}z7~IbYg=1u xbL0L-A2bN!I@I^;%h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_black.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo_black.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}Uzxc2(cqV3x@(*T80LCJ z{zkCgKrNWdv#=Aa=k``T~BkHud)3?y4mmrb`qzNfoPxWbF> zt}^8c1{~|e$r!{s=(f*h%)?XBuZ30OA9NjsG6BEO8AlFQP;lu`OKWS}z7~IbYg=1u xbL0L-A2bN!I@I^;%h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_blue.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo_blue.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}Uzxc2(cqV3x@(*T80LCJ z{zkCgKrNWdv#=Aa=k``T~BkHud)3?y4mmrb`qzNfoPxWbF> zt}^8c1{~|e$r!{s=(f*h%)?XBuZ30OA9NjsG6BEO8AlFQP;lu`OKWS}z7~IbYg=1u xbL0L-A2bN!I@I^;%h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_brown.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo_brown.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}Uzxc2(cqV3x@(*T80LCJ z{zkCgKrNWdv#=Aa=k``T~BkHud)3?y4mmrb`qzNfoPxWbF> zt}^8c1{~|e$r!{s=(f*h%)?XBuZ30OA9NjsG6BEO8AlFQP;lu`OKWS}z7~IbYg=1u xbL0L-A2bN!I@I^;%h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_cyan.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo_cyan.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}Uzxc2(cqV3x@(*T80LCJ z{zkCgKrNWdv#=Aa=k``T~BkHud)3?y4mmrb`qzNfoPxWbF> zt}^8c1{~|e$r!{s=(f*h%)?XBuZ30OA9NjsG6BEO8AlFQP;lu`OKWS}z7~IbYg=1u xbL0L-A2bN!I@I^;%h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_gray.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo_gray.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}Uzxc2(cqV3x@(*T80LCJ z{zkCgKrNWdv#=Aa=k``T~BkHud)3?y4mmrb`qzNfoPxWbF> zt}^8c1{~|e$r!{s=(f*h%)?XBuZ30OA9NjsG6BEO8AlFQP;lu`OKWS}z7~IbYg=1u xbL0L-A2bN!I@I^;%h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_green.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo_green.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}Uzxc2(cqV3x@(*T80LCJ z{zkCgKrNWdv#=Aa=k``T~BkHud)3?y4mmrb`qzNfoPxWbF> zt}^8c1{~|e$r!{s=(f*h%)?XBuZ30OA9NjsG6BEO8AlFQP;lu`OKWS}z7~IbYg=1u xbL0L-A2bN!I@I^;%h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_light_blue.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo_light_blue.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}Uzxc2(cqV3x@(*T80LCJ z{zkCgKrNWdv#=Aa=k``T~BkHud)3?y4mmrb`qzNfoPxWbF> zt}^8c1{~|e$r!{s=(f*h%)?XBuZ30OA9NjsG6BEO8AlFQP;lu`OKWS}z7~IbYg=1u xbL0L-A2bN!I@I^;%h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_lime.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo_lime.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}Uzxc2(cqV3x@(*T80LCJ z{zkCgKrNWdv#=Aa=k``T~BkHud)3?y4mmrb`qzNfoPxWbF> zt}^8c1{~|e$r!{s=(f*h%)?XBuZ30OA9NjsG6BEO8AlFQP;lu`OKWS}z7~IbYg=1u xbL0L-A2bN!I@I^;%h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_magenta.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo_magenta.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}Uzxc2(cqV3x@(*T80LCJ z{zkCgKrNWdv#=Aa=k``T~BkHud)3?y4mmrb`qzNfoPxWbF> zt}^8c1{~|e$r!{s=(f*h%)?XBuZ30OA9NjsG6BEO8AlFQP;lu`OKWS}z7~IbYg=1u xbL0L-A2bN!I@I^;%h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_orange.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo_orange.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}Uzxc2(cqV3x@(*T80LCJ z{zkCgKrNWdv#=Aa=k``T~BkHud)3?y4mmrb`qzNfoPxWbF> zt}^8c1{~|e$r!{s=(f*h%)?XBuZ30OA9NjsG6BEO8AlFQP;lu`OKWS}z7~IbYg=1u xbL0L-A2bN!I@I^;%h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_pink.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo_pink.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}Uzxc2(cqV3x@(*T80LCJ z{zkCgKrNWdv#=Aa=k``T~BkHud)3?y4mmrb`qzNfoPxWbF> zt}^8c1{~|e$r!{s=(f*h%)?XBuZ30OA9NjsG6BEO8AlFQP;lu`OKWS}z7~IbYg=1u xbL0L-A2bN!I@I^;%h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_purple.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo_purple.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}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s2}vFi+PczgVvNU3e<6zC88S3w>Vi1xR5(7%fMT9C%@CC)Ik zYJt=6eF@Sq!_P`U)|ioRWhyfB+3AcZPECnZFpHd6$YisbsdQypPNlhYe(KhAHY28! zTvDD$@=2N&Z-F0x@v(7!d_I{LF!3$3V>-KNRB6dxtB=o4|@b&;9XR3x!h>F1*d~^+nne>8uozA z**NRma)Jw1E3GQ1OSqsO!6k6QYzgpq+#a_ZX3o8cMZj*1VJQ-huZ`EntHXc5{;(4C z7a_(xtFli)nPdT+fjcX*zqXX z@ijZVu`YkR<-T6~r*3d%5m-p;JM9KX9A%{&To1T9s-aI!*#BD5z*AkXI#sN?1??Q0 z{FSkr!*e;tZe-cyImR=&z$%z@E(^1K7pA3QmPhzD0@qk2lQMItjxdfbO@hzB3KF}` zBv!?w!Vm<=!{C>`zRC1V&O(%&XRFv!9%8`v8|GeN)d>8K&N)O2pcO~*Y!X(IvNr(w zzqE&WYsYj~@DOSr-duiC|E=2&Pop|aAA+JS4ky+0x$00c(^<6FF!>TQGHG_0J;~&g z%30Vqi^oU4!Pc>*i>AYP;7;QCS!7Q$Y34lJ{MVbVO6fj}RXNAnW%nozh?PCcWrsDW Xqvm5(DZA`yPTz~wTtplHF6Htk literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_silver.png b/resources/assets/neoraider_test/textures/blocks/glowfoo_silver.png new file mode 100644 index 0000000000000000000000000000000000000000..006ada88652895e2ca6e385ca7b91dc31f874b7a GIT binary patch literal 370 zcmV-&0ge8NP)h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_silver.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo_silver.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}Uzxc2(cqV3x@(*T80LCJ z{zkCgKrNWdv#=Aa=k``T~BkHud)3?y4mmrb`qzNfoPxWbF> zt}^8c1{~|e$r!{s=(f*h%)?XBuZ30OA9NjsG6BEO8AlFQP;lu`OKWS}z7~IbYg=1u xbL0L-A2bN!I@I^;%h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_white.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo_white.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}Uzxc2(cqV3x@(*T80LCJ z{zkCgKrNWdv#=Aa=k``T~BkHud)3?y4mmrb`qzNfoPxWbF> zt}^8c1{~|e$r!{s=(f*h%)?XBuZ30OA9NjsG6BEO8AlFQP;lu`OKWS}z7~IbYg=1u xbL0L-A2bN!I@I^;%h1$9>q@3DJFU2ldYXs_~zDY)gxS5dFrFQw{_zTyfI1s>a8yrWY$g< z&^z{^uRi##%5?^vJCB$6yZ3qrnjB~J!xKdlG{NCaqnK!s*Vzq~YoQ&i!sMI<{}l8h22lPVki0W9uU-*lr2 QQ~&?~07*qoM6N<$f&oXGKL7v# literal 0 HcmV?d00001 diff --git a/resources/assets/neoraider_test/textures/blocks/glowfoo_yellow.xcf b/resources/assets/neoraider_test/textures/blocks/glowfoo_yellow.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f84c5a832268e5494227bd57f19a1e5fb91b6c28 GIT binary patch literal 2189 zcmd5+O=uHQ5Z+CbG_9$||AQVD1^Z)TTLiUQYgG^rJt$ff|F>zf2GgcAZMBEgi+WYE z9`(Kv3L}Ae07L*Ce~+%;vqAYCKpFoMiH5zM1#l?98`O!h^%o zy+B9`g(E=$#m7{{bu+3+##U6%sVB~7q-bwLb)wdy?qD|MZO8oGxcU@4)*l{}m7rf4 z2@fD7U|bZMVxtq0pcIQn!UN6qO(7)^jYLPJCVTOZDE+e3exTi!Dn@5P4YKzK-zI`~}(PE-RK<{ujhk4oX8!0lj+_D4gZSa7slAnpDgDj{pPQXiOz zj|HIyJMNmsHooL2u6zJBXuEsmiQotY-Kf;@UQ`dWspECb#zmmcQw~WzDz`UO*xm}e zp~BvTHl53bCd>EpX;Vc^9LJf#t91y1#7n^4bA2Oh~-XRky_>jr2He|v{s}0$OI1}d{cGrTV}dn{ar4C@xWLje%QCI(?n7iOrP{1LWP_Ffv4V|S?jzim97MsEi-k;cp34E~}}Uzxc2(cqV3x@(*T80LCJ z{zkCgKrNWdv#=Aa=k``T~BkHud)3?y4mmrb`qzNfoPxWbF> zt}^8c1{~|e$r!{s=(f*h%)?XBuZ30OA9NjsG6BEO8AlFQP;lu`OKWS}z7~IbYg=1u xbL0L-A2bN!I@I^;% Date: Sat, 28 Mar 2015 01:38:22 +0100 Subject: [PATCH 10/10] Add liquid light --- .../minecraft/test/LiquidLight.java | 135 ++++++++++++++++++ .../universe_factory/minecraft/test/Test.java | 4 + .../assets/neoraider_test/lang/en_US.lang | 5 +- .../textures/blocks/liquid_light_flow.png | Bin 0 -> 8516 bytes .../blocks/liquid_light_flow.png.mcmeta | 3 + .../textures/blocks/liquid_light_still.png | Bin 0 -> 10093 bytes .../blocks/liquid_light_still.png.mcmeta | 5 + .../textures/items/bucket_light.png | Bin 0 -> 569 bytes .../textures/items/bucket_light.xcf | Bin 0 -> 2494 bytes 9 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 java/net/universe_factory/minecraft/test/LiquidLight.java create mode 100644 resources/assets/neoraider_test/textures/blocks/liquid_light_flow.png create mode 100644 resources/assets/neoraider_test/textures/blocks/liquid_light_flow.png.mcmeta create mode 100644 resources/assets/neoraider_test/textures/blocks/liquid_light_still.png create mode 100644 resources/assets/neoraider_test/textures/blocks/liquid_light_still.png.mcmeta create mode 100644 resources/assets/neoraider_test/textures/items/bucket_light.png create mode 100644 resources/assets/neoraider_test/textures/items/bucket_light.xcf diff --git a/java/net/universe_factory/minecraft/test/LiquidLight.java b/java/net/universe_factory/minecraft/test/LiquidLight.java new file mode 100644 index 0000000..537d365 --- /dev/null +++ b/java/net/universe_factory/minecraft/test/LiquidLight.java @@ -0,0 +1,135 @@ +package net.universe_factory.minecraft.test; + +import java.util.HashMap; +import java.util.Map; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBucket; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.FillBucketEvent; +import net.minecraftforge.fluids.BlockFluidClassic; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; +import cpw.mods.fml.common.eventhandler.Event.Result; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class LiquidLight extends Fluid { + private class BlockLiquidLight extends BlockFluidClassic { + @SideOnly(Side.CLIENT) + protected IIcon stillIcon; + @SideOnly(Side.CLIENT) + protected IIcon flowingIcon; + + public BlockLiquidLight() { + super(LiquidLight.this, Material.water); + setCreativeTab(CreativeTabs.tabMisc); + } + + @Override + public IIcon getIcon(int side, int meta) { + return (side == 0 || side == 1) ? stillIcon : flowingIcon; + } + + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(IIconRegister register) { + stillIcon = register.registerIcon(Test.MODID + ":liquid_light_still"); + flowingIcon = register.registerIcon(Test.MODID + ":liquid_light_flow"); + } + + @Override + public boolean canDisplace(IBlockAccess world, int x, int y, int z) { + if (world.getBlock(x, y, z).getMaterial().isLiquid()) + return false; + return super.canDisplace(world, x, y, z); + } + + @Override + public boolean displaceIfPossible(World world, int x, int y, int z) { + if (world.getBlock(x, y, z).getMaterial().isLiquid()) + return false; + return super.displaceIfPossible(world, x, y, z); + } + } + + private class ItemBucketLight extends ItemBucket { + public ItemBucketLight(Block block) { + super(block); + setUnlocalizedName("bucket_light"); + setContainerItem(Items.bucket); + setTextureName(Test.MODID + ":bucket_light"); + } + } + + public static class BucketHandler { + + public static BucketHandler INSTANCE = new BucketHandler(); + public Map buckets = new HashMap(); + + public BucketHandler() { + MinecraftForge.EVENT_BUS.register(this); + } + + @SubscribeEvent + public void onBucketFill(FillBucketEvent event) { + + ItemStack result = fillCustomBucket(event.world, event.target); + + if (result == null) + return; + + event.result = result; + event.setResult(Result.ALLOW); + } + + private ItemStack fillCustomBucket(World world, MovingObjectPosition pos) { + + Block block = world.getBlock(pos.blockX, pos.blockY, pos.blockZ); + + Item bucket = buckets.get(block); + if (bucket != null && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0) { + world.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ); + return new ItemStack(bucket); + } else + return null; + + } + } + + public LiquidLight() { + super("liquid_light"); + + setDensity(1); + setLuminosity(15); + setViscosity(1000); + } + + public void register() { + FluidRegistry.registerFluid(this); + + BlockLiquidLight block = new BlockLiquidLight(); + + GameRegistry.registerBlock(block, "liquid_light"); + setUnlocalizedName(block.getUnlocalizedName()); + + ItemBucketLight bucket = new ItemBucketLight(block); + GameRegistry.registerItem(bucket, "bucket_light"); + FluidContainerRegistry.registerFluidContainer(this, new ItemStack(bucket), new ItemStack(Items.bucket)); + + BucketHandler.INSTANCE.buckets.put(block, bucket); + } +} diff --git a/java/net/universe_factory/minecraft/test/Test.java b/java/net/universe_factory/minecraft/test/Test.java index 3fad78e..8dfe613 100644 --- a/java/net/universe_factory/minecraft/test/Test.java +++ b/java/net/universe_factory/minecraft/test/Test.java @@ -184,6 +184,8 @@ public class Test { public static final ExtensibleBiomeDecorator biomeDecorator = new ExtensibleBiomeDecorator(); + public static final LiquidLight liquidLight = new LiquidLight(); + @EventHandler public void preInit(FMLInitializationEvent event) { MinecraftForge.TERRAIN_GEN_BUS.register(new TerrainGenHandler()); @@ -211,6 +213,8 @@ public class Test { GameRegistry.addRecipe(new ItemStack(glowfoo, 4, i), "###", "#X#", "###", '#', new ItemStack(Blocks.stained_glass_pane, 1, i), 'X', Blocks.redstone_block); + liquidLight.register(); + biomeDecorator.registerTree(new ExtensibleBiomeDecorator.Tree() { @Override public Entry replaceTree(World world, BiomeGenBase biome, Random random, int x, int y, int z, diff --git a/resources/assets/neoraider_test/lang/en_US.lang b/resources/assets/neoraider_test/lang/en_US.lang index ac39b16..9c3e858 100644 --- a/resources/assets/neoraider_test/lang/en_US.lang +++ b/resources/assets/neoraider_test/lang/en_US.lang @@ -40,4 +40,7 @@ tile.glowfoo.yellow.name=Yellow Light tile.glowfoo.lightBlue.name=Light Blue Light tile.glowfoo.magenta.name=Magenta Light tile.glowfoo.orange.name=Orange Light -tile.glowfoo.white.name=White Light \ No newline at end of file + + +tile.liquid_light.name=Liquid Light +item.bucket_light.name=Light Bucket \ No newline at end of file diff --git a/resources/assets/neoraider_test/textures/blocks/liquid_light_flow.png b/resources/assets/neoraider_test/textures/blocks/liquid_light_flow.png new file mode 100644 index 0000000000000000000000000000000000000000..64ab95a0b62fadd2d1e5928305f49595cbdb2ecd GIT binary patch literal 8516 zcma)ic{o(@-}V_36Jjb$mMkG_C~Gmp*g|M**|&rck}bwIh_aO}TNz{-W#6-tknH=G zeHq3cLkQ2P-rw^)??3N*-Pc@at~uw-b>rI-FDOQ`dM5tzs?_%Y&D$X zBrV8B>p^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