Some progress on floating flowers

This commit is contained in:
Vincent Lee committed 2015-12-28 14:17:10 -06:00
1 parent bf07f10ac7
commit b701f197ee
6 files changed
+324 -10

No files matched your search

@@ -36,12 +36,14 @@ import org.apache.commons.lang3.tuple.Pair;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.state.BotaniaStateProps;
import vazkii.botania.api.subtile.SubTileEntity;
import vazkii.botania.common.block.decor.IFloatingFlower;
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
import javax.vecmath.Matrix4f;
import java.io.IOException;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import java.util.Map;
public class SpecialFlowerModel implements IModelCustomData {
@@ -108,6 +110,12 @@ public class SpecialFlowerModel implements IModelCustomData {
ImmutableSet.Builder<ResourceLocation> builder = ImmutableSet.builder();
builder.addAll(blockModels.values());
builder.addAll(itemModels.values());
// Force mini island model to be loaded and baked, for use elsewhere. See <TODO>
for (IFloatingFlower.IslandType i : IFloatingFlower.IslandType.values()) {
builder.add(new ModelResourceLocation("botania:miniIsland", i.name().toLowerCase(Locale.ROOT)));
}
return builder.build();
}
@@ -76,7 +76,7 @@ public class BlockFloatingFlower extends BlockModContainer implements ILexiconab
@Override
public int getMetaFromState(IBlockState state) {
return ((EnumDyeColor) state.getValue(BotaniaStateProps.COLOR)).getMetadata();
return state.getValue(BotaniaStateProps.COLOR).getMetadata();
}
@Override
@@ -90,7 +90,7 @@ public class BlockFloatingFlower extends BlockModContainer implements ILexiconab
@Override
@Optional.Method(modid = "easycoloredlights")
public int getLightValue(IBlockAccess world, BlockPos pos) {
return ColoredLightHelper.getPackedColor(((EnumDyeColor) world.getBlockState(pos).getValue(BotaniaStateProps.COLOR)), originalLight);
return ColoredLightHelper.getPackedColor(world.getBlockState(pos).getValue(BotaniaStateProps.COLOR), originalLight);
}
@Override
@@ -110,7 +110,7 @@ public class BlockFloatingFlower extends BlockModContainer implements ILexiconab
@Override
public void randomDisplayTick(World par1World, BlockPos pos, IBlockState state, Random par5Random) {
int hex = ((EnumDyeColor) state.getValue(BotaniaStateProps.COLOR)).getMapColor().colorValue;
int hex = state.getValue(BotaniaStateProps.COLOR).getMapColor().colorValue;
int r = (hex & 0xFF0000) >> 16;
int g = (hex & 0xFF00) >> 8;
int b = (hex & 0xFF);
@@ -168,11 +168,6 @@ public class BlockFloatingFlower extends BlockModContainer implements ILexiconab
return false;
}
@Override
public int getRenderType() {
return LibRenderIDs.idMiniIsland;
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileFloatingFlower();
@@ -1,9 +1,9 @@
{
"forge_marker": 1,
"defaults": {
"model": "minecraft:cube_all",
"model": "botania:miniIsland",
"textures": {
"all": "botania:blocks/cellBlock"
"all": "botania:model/miniIslandCopy"
},
"transform": "forge:default-block"
},
@@ -0,0 +1,18 @@
{
"forge_marker": 1,
"defaults": {
"model": "botania:miniIsland"
},
"variants": {
"grass": { "textures": { "all": "botania:model/miniIsland" } },
"podzol": { "textures": { "all": "botania:model/miniIslandPodzol" } },
"mycel": { "textures": { "all": "botania:model/miniIslandMycelium" } },
"snow": { "textures": { "all": "botania:model/miniIslandSnow" } },
"dry": { "textures": { "all": "botania:model/miniIslandDry" } },
"golden": { "textures": { "all": "botania:model/miniIslandGolden" } },
"vivid": { "textures": { "all": "botania:model/miniIslandVivid" } },
"scorched": { "textures": { "all": "botania:model/miniIslandScorched" } },
"infused": { "textures": { "all": "botania:model/miniIslandInfused" } },
"mutated": { "textures": { "all": "botania:model/miniIslandMutated" } }
}
}
@@ -0,0 +1,293 @@
{
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
"textures": {
},
"elements": [
{
"name": "Shape0",
"from": [ 7.0, 2.0, 7.0 ],
"to": [ 9.0, 7.0, 9.0 ],
"faces": {
"north": { "texture": "#all", "uv": [ 0.5, 0.5, 1.0, 1.75 ] },
"east": { "texture": "#all", "uv": [ 1.0, 0.5, 1.5, 1.75 ] },
"south": { "texture": "#all", "uv": [ 1.5, 0.5, 2.0, 1.75 ] },
"west": { "texture": "#all", "uv": [ 0.0, 0.5, 0.5, 1.75 ] },
"up": { "texture": "#all", "uv": [ 0.5, 0.0, 1.0, 0.5 ] },
"down": { "texture": "#all", "uv": [ 1.0, 0.0, 1.5, 0.5 ] }
}
},
{
"name": "Shape1-1",
"from": [ 7.0, 3.0, 5.0 ],
"to": [ 9.0, 7.0, 7.0 ],
"faces": {
"north": { "texture": "#all", "uv": [ 2.5, 0.5, 3.0, 1.5 ] },
"east": { "texture": "#all", "uv": [ 3.0, 0.5, 3.5, 1.5 ] },
"south": { "texture": "#all", "uv": [ 3.5, 0.5, 4.0, 1.5 ] },
"west": { "texture": "#all", "uv": [ 2.0, 0.5, 2.5, 1.5 ] },
"up": { "texture": "#all", "uv": [ 2.5, 0.0, 3.0, 0.5 ] },
"down": { "texture": "#all", "uv": [ 3.0, 0.0, 3.5, 0.5 ] }
}
},
{
"name": "Shape1-2",
"from": [ 5.0, 3.0, 7.0 ],
"to": [ 7.0, 7.0, 9.0 ],
"faces": {
"south": { "texture": "#all", "uv": [ 4.5, 0.5, 5.0, 1.5 ] },
"west": { "texture": "#all", "uv": [ 5.0, 0.5, 5.5, 1.5 ] },
"north": { "texture": "#all", "uv": [ 5.5, 0.5, 6.0, 1.5 ] },
"up": { "texture": "#all", "uv": [ 4.5, 0.0, 5.0, 0.5 ] },
"down": { "texture": "#all", "uv": [ 5.0, 0.0, 5.5, 0.5 ] }
}
},
{
"name": "Shape1-3",
"from": [ 7.0, 3.0, 9.0 ],
"to": [ 9.0, 7.0, 11.0 ],
"faces": {
"east": { "texture": "#all", "uv": [ 7.0, 0.5, 7.5, 1.5 ] },
"south": { "texture": "#all", "uv": [ 7.5, 0.5, 8.0, 1.5 ] },
"west": { "texture": "#all", "uv": [ 6.0, 0.5, 6.5, 1.5 ] },
"up": { "texture": "#all", "uv": [ 6.5, 0.0, 7.0, 0.5 ] },
"down": { "texture": "#all", "uv": [ 7.0, 0.0, 7.5, 0.5 ] }
}
},
{
"name": "Shape1-4",
"from": [ 9.0, 3.0, 7.0 ],
"to": [ 11.0, 7.0, 9.0 ],
"faces": {
"south": { "texture": "#all", "uv": [ 8.5, 0.5, 9.0, 1.5 ] },
"north": { "texture": "#all", "uv": [ 9.5, 0.5, 10.0, 1.5 ] },
"east": { "texture": "#all", "uv": [ 8.0, 0.5, 8.5, 1.5 ] },
"up": { "texture": "#all", "uv": [ 8.5, 0.0, 9.0, 0.5 ] },
"down": { "texture": "#all", "uv": [ 9.0, 0.0, 9.5, 0.5 ] }
}
},
{
"name": "Shape2-1",
"from": [ 7.0, 4.0, 3.0 ],
"to": [ 9.0, 7.0, 5.0 ],
"faces": {
"north": { "texture": "#all", "uv": [ 2.5, 2.0, 3.0, 2.75 ] },
"east": { "texture": "#all", "uv": [ 3.0, 2.0, 3.5, 2.75 ] },
"west": { "texture": "#all", "uv": [ 2.0, 2.0, 2.5, 2.75 ] },
"up": { "texture": "#all", "uv": [ 2.5, 1.5, 3.0, 2.0 ] },
"down": { "texture": "#all", "uv": [ 3.0, 1.5, 3.5, 2.0 ] }
}
},
{
"name": "Shape2-2",
"from": [ 3.0, 4.0, 7.0 ],
"to": [ 5.0, 7.0, 9.0 ],
"faces": {
"south": { "texture": "#all", "uv": [ 4.5, 2.0, 5.0, 2.75 ] },
"west": { "texture": "#all", "uv": [ 5.0, 2.0, 5.5, 2.75 ] },
"north": { "texture": "#all", "uv": [ 5.5, 2.0, 6.0, 2.75 ] },
"up": { "texture": "#all", "uv": [ 4.5, 1.5, 5.0, 2.0 ] },
"down": { "texture": "#all", "uv": [ 5.0, 1.5, 5.5, 2.0 ] }
}
},
{
"name": "Shape2-3",
"from": [ 7.0, 4.0, 11.0 ],
"to": [ 9.0, 7.0, 13.0 ],
"faces": {
"east": { "texture": "#all", "uv": [ 7.0, 2.0, 7.5, 2.75 ] },
"south": { "texture": "#all", "uv": [ 7.5, 2.0, 8.0, 2.75 ] },
"west": { "texture": "#all", "uv": [ 6.0, 2.0, 6.5, 2.75 ] },
"up": { "texture": "#all", "uv": [ 6.5, 1.5, 7.0, 2.0 ] },
"down": { "texture": "#all", "uv": [ 7.0, 1.5, 7.5, 2.0 ] }
}
},
{
"name": "Shape2-4",
"from": [ 11.0, 4.0, 7.0 ],
"to": [ 13.0, 7.0, 9.0 ],
"faces": {
"south": { "texture": "#all", "uv": [ 8.5, 2.0, 9.0, 2.75 ] },
"north": { "texture": "#all", "uv": [ 9.5, 2.0, 10.0, 2.75 ] },
"east": { "texture": "#all", "uv": [ 8.0, 2.0, 8.5, 2.75 ] },
"up": { "texture": "#all", "uv": [ 8.5, 1.5, 9.0, 2.0 ] },
"down": { "texture": "#all", "uv": [ 9.0, 1.5, 9.5, 2.0 ] }
}
},
{
"name": "Shape2-5",
"from": [ 5.0, 4.0, 5.0 ],
"to": [ 7.0, 7.0, 7.0 ],
"faces": {
"west": { "texture": "#all", "uv": [ 2.5, 3.25, 3.0, 4.0 ] },
"north": { "texture": "#all", "uv": [ 3.0, 3.25, 3.5, 4.0 ] },
"up": { "texture": "#all", "uv": [ 2.5, 2.75, 3.0, 3.25 ] },
"down": { "texture": "#all", "uv": [ 3.0, 2.75, 3.5, 3.25 ] }
}
},
{
"name": "Shape2-6",
"from": [ 5.0, 4.0, 9.0 ],
"to": [ 7.0, 7.0, 11.0 ],
"faces": {
"south": { "texture": "#all", "uv": [ 5.0, 3.25, 5.5, 4.0 ] },
"west": { "texture": "#all", "uv": [ 5.5, 3.25, 6.0, 4.0 ] },
"up": { "texture": "#all", "uv": [ 4.5, 2.75, 5.0, 3.25 ] },
"down": { "texture": "#all", "uv": [ 5.0, 2.75, 5.5, 3.25 ] }
}
},
{
"name": "Shape2-7",
"from": [ 9.0, 4.0, 9.0 ],
"to": [ 11.0, 7.0, 11.0 ],
"faces": {
"south": { "texture": "#all", "uv": [ 6.0, 3.25, 6.5, 4.0 ] },
"east": { "texture": "#all", "uv": [ 7.5, 3.25, 8.0, 4.0 ] },
"up": { "texture": "#all", "uv": [ 6.5, 2.75, 7.0, 3.25 ] },
"down": { "texture": "#all", "uv": [ 7.0, 2.75, 7.5, 3.25 ] }
}
},
{
"name": "Shape2-8",
"from": [ 9.0, 4.0, 5.0 ],
"to": [ 11.0, 7.0, 7.0 ],
"faces": {
"north": { "texture": "#all", "uv": [ 8.0, 3.25, 8.5, 4.0 ] },
"east": { "texture": "#all", "uv": [ 8.5, 3.25, 9.0, 4.0 ] },
"up": { "texture": "#all", "uv": [ 8.5, 2.75, 9.0, 3.25 ] },
"down": { "texture": "#all", "uv": [ 9.0, 2.75, 9.5, 3.25 ] }
}
},
{
"name": "Shape3-1",
"from": [ 5.0, 5.0, 3.0 ],
"to": [ 7.0, 7.0, 5.0 ],
"faces": {
"west": { "texture": "#all", "uv": [ 2.5, 4.5, 3.0, 5.0 ] },
"north": { "texture": "#all", "uv": [ 3.0, 4.5, 3.5, 5.0 ] },
"up": { "texture": "#all", "uv": [ 2.5, 4.0, 3.0, 4.5 ] },
"down": { "texture": "#all", "uv": [ 3.0, 4.0, 3.5, 4.5 ] }
}
},
{
"name": "Shape3-2",
"from": [ 3.0, 5.0, 9.0 ],
"to": [ 5.0, 7.0, 11.0 ],
"faces": {
"south": { "texture": "#all", "uv": [ 5.0, 4.5, 5.5, 5.0 ] },
"west": { "texture": "#all", "uv": [ 5.5, 4.5, 6.0, 5.0 ] },
"up": { "texture": "#all", "uv": [ 4.5, 4.0, 5.0, 4.5 ] },
"down": { "texture": "#all", "uv": [ 5.0, 4.0, 5.5, 4.5 ] }
}
},
{
"name": "Shape3-3",
"from": [ 9.0, 5.0, 11.0 ],
"to": [ 11.0, 7.0, 13.0 ],
"faces": {
"east": { "texture": "#all", "uv": [ 7.5, 4.5, 8.0, 5.0 ] },
"south": { "texture": "#all", "uv": [ 6.0, 4.5, 6.5, 5.0 ] },
"up": { "texture": "#all", "uv": [ 6.5, 4.0, 7.0, 4.5 ] },
"down": { "texture": "#all", "uv": [ 7.0, 4.0, 7.5, 4.5 ] }
}
},
{
"name": "Shape3-4",
"from": [ 11.0, 5.0, 5.0 ],
"to": [ 13.0, 7.0, 7.0 ],
"faces": {
"east": { "texture": "#all", "uv": [ 8.5, 4.5, 9.0, 5.0 ] },
"north": { "texture": "#all", "uv": [ 8.0, 4.5, 8.5, 5.0 ] },
"up": { "texture": "#all", "uv": [ 8.5, 4.0, 9.0, 4.5 ] },
"down": { "texture": "#all", "uv": [ 9.0, 4.0, 9.5, 4.5 ] }
}
},
{
"name": "Shape3-5",
"from": [ 3.0, 5.0, 5.0 ],
"to": [ 5.0, 7.0, 7.0 ],
"faces": {
"west": { "texture": "#all", "uv": [ 2.5, 5.5, 3.0, 6.0 ] },
"north": { "texture": "#all", "uv": [ 3.0, 5.5, 3.5, 6.0 ] },
"up": { "texture": "#all", "uv": [ 2.5, 5.0, 3.0, 5.5 ] },
"down": { "texture": "#all", "uv": [ 3.0, 5.0, 3.5, 5.5 ] }
}
},
{
"name": "Shape3-6",
"from": [ 5.0, 5.0, 11.0 ],
"to": [ 7.0, 7.0, 13.0 ],
"faces": {
"south": { "texture": "#all", "uv": [ 5.0, 5.5, 5.5, 6.0 ] },
"west": { "texture": "#all", "uv": [ 5.5, 5.5, 6.0, 6.0 ] },
"up": { "texture": "#all", "uv": [ 4.5, 5.0, 5.0, 5.5 ] },
"down": { "texture": "#all", "uv": [ 5.0, 5.0, 5.5, 5.5 ] }
}
},
{
"name": "Shape3-7",
"from": [ 11.0, 5.0, 9.0 ],
"to": [ 13.0, 7.0, 11.0 ],
"faces": {
"east": { "texture": "#all", "uv": [ 7.5, 5.5, 8.0, 6.0 ] },
"south": { "texture": "#all", "uv": [ 6.0, 5.5, 6.5, 6.0 ] },
"up": { "texture": "#all", "uv": [ 6.5, 5.0, 7.0, 5.5 ] },
"down": { "texture": "#all", "uv": [ 7.0, 5.0, 7.5, 5.5 ] }
}
},
{
"name": "Shape3-8",
"from": [ 9.0, 5.0, 3.0 ],
"to": [ 11.0, 7.0, 5.0 ],
"faces": {
"east": { "texture": "#all", "uv": [ 8.5, 5.5, 9.0, 6.0 ] },
"north": { "texture": "#all", "uv": [ 8.0, 5.5, 8.5, 6.0 ] },
"up": { "texture": "#all", "uv": [ 8.5, 5.0, 9.0, 5.5 ] },
"down": { "texture": "#all", "uv": [ 9.0, 5.0, 9.5, 5.5 ] }
}
},
{
"name": "Shape4-1",
"from": [ 3.0, 6.0, 3.0 ],
"to": [ 5.0, 7.0, 5.0 ],
"faces": {
"west": { "texture": "#all", "uv": [ 2.5, 6.5, 3.0, 6.75 ] },
"north": { "texture": "#all", "uv": [ 3.0, 6.5, 3.5, 6.75 ] },
"up": { "texture": "#all", "uv": [ 2.5, 6.0, 3.0, 6.5 ] },
"down": { "texture": "#all", "uv": [ 3.0, 6.0, 3.5, 6.5 ] }
}
},
{
"name": "Shape4-2",
"from": [ 3.0, 6.0, 11.0 ],
"to": [ 5.0, 7.0, 13.0 ],
"faces": {
"south": { "texture": "#all", "uv": [ 5.0, 6.5, 5.5, 6.75 ] },
"west": { "texture": "#all", "uv": [ 5.5, 6.5, 6.0, 6.75 ] },
"up": { "texture": "#all", "uv": [ 4.5, 6.0, 5.0, 6.5 ] },
"down": { "texture": "#all", "uv": [ 5.0, 6.0, 5.5, 6.5 ] }
}
},
{
"name": "Shape4-3",
"from": [ 11.0, 6.0, 11.0 ],
"to": [ 13.0, 7.0, 13.0 ],
"faces": {
"south": { "texture": "#all", "uv": [ 6.0, 6.5, 6.5, 6.75 ] },
"east": { "texture": "#all", "uv": [ 7.5, 6.5, 8.0, 6.75 ] },
"up": { "texture": "#all", "uv": [ 6.5, 6.0, 7.0, 6.5 ] },
"down": { "texture": "#all", "uv": [ 7.0, 6.0, 7.5, 6.5 ] }
}
},
{
"name": "Shape4-4",
"from": [ 11.0, 6.0, 3.0 ],
"to": [ 13.0, 7.0, 5.0 ],
"faces": {
"north": { "texture": "#all", "uv": [ 8.0, 6.5, 8.5, 6.75 ] },
"east": { "texture": "#all", "uv": [ 8.5, 6.5, 9.0, 6.75 ] },
"up": { "texture": "#all", "uv": [ 8.5, 6.0, 9.0, 6.5 ] },
"down": { "texture": "#all", "uv": [ 9.0, 6.0, 9.5, 6.5 ] }
}
}
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB