mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-16 01:55:15 +00:00
Floating flowers kinda sorta mostly working
This commit is contained in:
1 parent
8f70814ae6
commit
3aef9efe8b
8 files changed
+188
-42
No files matched your search
@@ -11,6 +11,7 @@ import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import vazkii.botania.api.state.enums.*;
|
||||
import vazkii.botania.common.block.decor.IFloatingFlower;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -46,6 +47,10 @@ public class BotaniaStateProps {
|
||||
// The axis directions (think quartz pillars and wood logs)
|
||||
public static final PropertyEnum<EnumFacing.Axis> AXIS_FACING = BlockRotatedPillar.AXIS;
|
||||
|
||||
// Island type (floating flowers)
|
||||
// TODO !!!! MOVE TYPE "ISLANDTYPE" INTO API
|
||||
public static final PropertyEnum ISLAND_TYPE = PropertyEnum.create("islandtype", IFloatingFlower.IslandType.class);
|
||||
|
||||
// Extra Quartz Blocks
|
||||
public static final PropertyEnum<QuartzVariant> QUARTZ_VARIANT = PropertyEnum.create("variant", QuartzVariant.class);
|
||||
|
||||
|
||||
@@ -8,8 +8,10 @@ import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockRailPowered;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.block.BlockWall;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.renderer.block.statemap.StateMap;
|
||||
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -519,6 +521,14 @@ public final class ModelHandler {
|
||||
}
|
||||
|
||||
private static void registerStateMappers() {
|
||||
// Override for floating flowers
|
||||
ModelLoader.setCustomStateMapper(ModBlocks.floatingSpecialFlower, new StateMapperBase() {
|
||||
@Override
|
||||
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
||||
return new ModelResourceLocation("botania:floatingSpecialFlower", "normal");
|
||||
}
|
||||
});
|
||||
|
||||
// Ignore vanilla facing, variant in double flower
|
||||
ModelLoader.setCustomStateMapper(ModBlocks.doubleFlower1, (new StateMap.Builder()).ignore(BlockDoublePlant.VARIANT, BlockDoublePlant.field_181084_N).build());
|
||||
ModelLoader.setCustomStateMapper(ModBlocks.doubleFlower2, (new StateMap.Builder()).ignore(BlockDoublePlant.VARIANT, BlockDoublePlant.field_181084_N).build());
|
||||
|
||||
@@ -1,22 +1,40 @@
|
||||
package vazkii.botania.client.model;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Iterables;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormatElement;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelManager;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.client.model.ISmartBlockModel;
|
||||
import net.minecraftforge.client.model.ISmartItemModel;
|
||||
import net.minecraftforge.client.model.TRSRTransformation;
|
||||
import net.minecraftforge.client.model.pipeline.IVertexConsumer;
|
||||
import net.minecraftforge.client.model.pipeline.UnpackedBakedQuad;
|
||||
import net.minecraftforge.client.model.pipeline.VertexTransformer;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.common.block.decor.IFloatingFlower;
|
||||
import vazkii.botania.common.item.block.ItemBlockFloatingSpecialFlower;
|
||||
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.vecmath.Vector3f;
|
||||
import javax.vecmath.Vector4f;
|
||||
import java.util.List;
|
||||
|
||||
public class FloatingFlowerModel implements ISmartItemModel {
|
||||
public class FloatingFlowerModel implements ISmartItemModel, ISmartBlockModel {
|
||||
public static final FloatingFlowerModel INSTANCE = new FloatingFlowerModel();
|
||||
|
||||
@Override
|
||||
public IBakedModel handleItemState(ItemStack stack) {
|
||||
ModelManager modelManager = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager();
|
||||
@@ -26,41 +44,89 @@ public class FloatingFlowerModel implements ISmartItemModel {
|
||||
|
||||
IBakedModel flowerModel = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getItemModel(ItemBlockSpecialFlower.ofType(ItemBlockFloatingSpecialFlower.getType(stack)));
|
||||
|
||||
return new CompositeBakedModel(flowerModel, islandType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel handleBlockState(IBlockState state) {
|
||||
IExtendedBlockState realState = ((IExtendedBlockState) state);
|
||||
|
||||
ModelManager modelManager = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager();
|
||||
|
||||
// Item form always has island type grass.
|
||||
IBakedModel islandType = modelManager.getModel(new ModelResourceLocation("botania:miniIsland", "variant=" + ((IFloatingFlower.IslandType) realState.getValue(BotaniaStateProps.ISLAND_TYPE)).getName()));
|
||||
|
||||
IBakedModel flowerModel = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getItemModel(ItemBlockSpecialFlower.ofType(realState.getValue(BotaniaStateProps.SUBTILE_ID)));
|
||||
|
||||
return new CompositeBakedModel(flowerModel, islandType);
|
||||
}
|
||||
|
||||
private class CompositeBakedModel implements IBakedModel {
|
||||
protected static BakedQuad transform(BakedQuad quad, final TRSRTransformation transform) {
|
||||
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder(DefaultVertexFormats.ITEM);
|
||||
final IVertexConsumer consumer = new VertexTransformer(builder) {
|
||||
@Override
|
||||
public void put(int element, float... data) {
|
||||
VertexFormatElement formatElement = DefaultVertexFormats.ITEM.getElement(element);
|
||||
switch (formatElement.getUsage()) {
|
||||
case POSITION: {
|
||||
float[] newData = new float[4];
|
||||
Vector4f vec = new Vector4f(data);
|
||||
transform.getMatrix().transform(vec);
|
||||
vec.get(newData);
|
||||
parent.put(element, newData);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
parent.put(element, data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
quad.pipe(consumer);
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
private static class CompositeBakedModel implements IBakedModel {
|
||||
|
||||
private final IBakedModel base;
|
||||
private final List<IBakedModel> compose;
|
||||
private final List<BakedQuad> genQuads;
|
||||
|
||||
public CompositeBakedModel(IBakedModel base, IBakedModel... compose) {
|
||||
this.base = base;
|
||||
this.compose = ImmutableList.copyOf(compose);
|
||||
}
|
||||
public CompositeBakedModel(IBakedModel flower, IBakedModel island) {
|
||||
this.base = flower;
|
||||
|
||||
@Override
|
||||
public List<BakedQuad> getFaceQuads(EnumFacing p_177551_1_) {
|
||||
ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();
|
||||
builder.addAll(base.getFaceQuads(p_177551_1_));
|
||||
for (IBakedModel model : compose) {
|
||||
builder.addAll(model.getFaceQuads(p_177551_1_));
|
||||
ImmutableList.Builder<BakedQuad> genBuilder = ImmutableList.builder();
|
||||
final TRSRTransformation transform = TRSRTransformation.blockCenterToCorner(new TRSRTransformation(new Vector3f(0F, 0.2F, 0F), null, new Vector3f(0.5F, 0.5F, 0.5F), null));
|
||||
|
||||
|
||||
// Add flower quads, scaled and translated
|
||||
for (BakedQuad quad : flower.getGeneralQuads()) {
|
||||
genBuilder.add(transform(quad, transform));
|
||||
}
|
||||
return builder.build();
|
||||
|
||||
for (EnumFacing e : EnumFacing.VALUES) {
|
||||
genBuilder.addAll(Iterables.transform(flower.getFaceQuads(e), new Function<BakedQuad, BakedQuad>() {
|
||||
@Override public BakedQuad apply(BakedQuad input) { return transform(input, transform); }
|
||||
}));
|
||||
}
|
||||
|
||||
// Add island quads
|
||||
genBuilder.addAll(island.getGeneralQuads());
|
||||
for (EnumFacing e: EnumFacing.VALUES) {
|
||||
genBuilder.addAll(island.getFaceQuads(e));
|
||||
}
|
||||
|
||||
genQuads = genBuilder.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BakedQuad> getGeneralQuads() {
|
||||
ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();
|
||||
builder.addAll(base.getGeneralQuads());
|
||||
for (IBakedModel model : compose) {
|
||||
builder.addAll(model.getGeneralQuads());
|
||||
}
|
||||
return builder.build();
|
||||
|
||||
return genQuads;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BakedQuad> getFaceQuads(EnumFacing p_177551_1_) { return ImmutableList.of(); }
|
||||
|
||||
@Override
|
||||
public boolean isAmbientOcclusion() {
|
||||
return base.isAmbientOcclusion();
|
||||
@@ -68,7 +134,7 @@ public class FloatingFlowerModel implements ISmartItemModel {
|
||||
|
||||
@Override
|
||||
public boolean isGui3d() {
|
||||
return base.isGui3d();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,7 +12,9 @@ package vazkii.botania.client.render.tile;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.BlockRendererDispatcher;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
@@ -23,9 +25,12 @@ import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraftforge.client.model.ISmartBlockModel;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.client.core.handler.ClientTickHandler;
|
||||
import vazkii.botania.client.model.FloatingFlowerModel;
|
||||
import vazkii.botania.client.model.ModelMiniIsland;
|
||||
import vazkii.botania.common.block.decor.IFloatingFlower;
|
||||
|
||||
@@ -35,6 +40,7 @@ public class RenderTileFloatingFlower extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double d0, double d1, double d2, float t, int digProgress) {
|
||||
BlockRendererDispatcher brd = Minecraft.getMinecraft().getBlockRendererDispatcher();
|
||||
IFloatingFlower flower = (IFloatingFlower) tile;
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
@@ -53,19 +59,18 @@ public class RenderTileFloatingFlower extends TileEntitySpecialRenderer {
|
||||
GlStateManager.rotate(4F * (float) Math.sin(worldTime * 0.04F), 1F, 0F, 0F);
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(flower.getIslandType().getResource());
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0.5F, 1.4F, 0.5F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
model.render();
|
||||
|
||||
IBlockState state = tile.getWorld().getBlockState(tile.getPos());
|
||||
state = state.getBlock().getExtendedState(state, tile.getWorld(), tile.getPos());
|
||||
IBakedModel ibakedmodel = FloatingFlowerModel.INSTANCE.handleBlockState(state);
|
||||
|
||||
brd.getBlockModelRenderer().renderModelBrightness(ibakedmodel, state, 1.0F, true);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
ItemStack stack = flower.getDisplayStack();
|
||||
GlStateManager.translate(0.5F, 0.65F, 0.5F);
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
Minecraft.getMinecraft().getRenderItem().func_181564_a(stack, ItemCameraTransforms.TransformType.NONE);
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,9 +14,13 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -29,6 +33,15 @@ import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.property.ExtendedBlockState;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import net.minecraftforge.common.property.IUnlistedProperty;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.oredict.RecipeSorter;
|
||||
import net.minecraftforge.oredict.RecipeSorter.Category;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
@@ -38,7 +51,9 @@ import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.api.subtile.ISpecialFlower;
|
||||
import vazkii.botania.api.wand.IWandHUD;
|
||||
import vazkii.botania.api.wand.IWandable;
|
||||
import vazkii.botania.client.model.FloatingFlowerModel;
|
||||
import vazkii.botania.common.block.decor.BlockFloatingFlower;
|
||||
import vazkii.botania.common.block.decor.IFloatingFlower;
|
||||
import vazkii.botania.common.block.tile.TileFloatingSpecialFlower;
|
||||
import vazkii.botania.common.block.tile.TileSpecialFlower;
|
||||
import vazkii.botania.common.crafting.recipe.SpecialFloatingFlowerRecipe;
|
||||
@@ -55,6 +70,47 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
|
||||
|
||||
GameRegistry.addRecipe(new SpecialFloatingFlowerRecipe());
|
||||
RecipeSorter.register("botania:floatingSpecialFlower", SpecialFloatingFlowerRecipe.class, Category.SHAPELESS, "");
|
||||
setDefaultState(((IExtendedBlockState) blockState.getBaseState())
|
||||
.withProperty(BotaniaStateProps.SUBTILE_ID, "daybloom")
|
||||
.withProperty(BotaniaStateProps.ISLAND_TYPE, IFloatingFlower.IslandType.GRASS)
|
||||
.withProperty(BotaniaStateProps.COLOR, EnumDyeColor.WHITE));
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return 2; // todo
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void onModelBake(ModelBakeEvent evt) {
|
||||
evt.modelRegistry.putObject(new ModelResourceLocation("botania:floatingSpecialFlower", "normal"), FloatingFlowerModel.INSTANCE);
|
||||
evt.modelRegistry.putObject(new ModelResourceLocation("botania:floatingSpecialFlower", "inventory"), FloatingFlowerModel.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState() {
|
||||
return new ExtendedBlockState(this, new IProperty[] {BotaniaStateProps.ISLAND_TYPE, BotaniaStateProps.COLOR}, new IUnlistedProperty[] {BotaniaStateProps.SUBTILE_ID});
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
if (te instanceof TileFloatingSpecialFlower) {
|
||||
state = state.withProperty(BotaniaStateProps.ISLAND_TYPE, ((TileFloatingSpecialFlower) te).getIslandType());
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
state = getActualState(state, world, pos);
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
if (te instanceof TileFloatingSpecialFlower) {
|
||||
state = ((IExtendedBlockState) state).withProperty(BotaniaStateProps.SUBTILE_ID, ((TileFloatingSpecialFlower) te).subTileName);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,7 +118,7 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
|
||||
int currentLight = ((TileSpecialFlower) world.getTileEntity(pos)).getLightValue();
|
||||
if(currentLight == -1)
|
||||
currentLight = originalLight;
|
||||
return LightHelper.getPackedColor(((EnumDyeColor) world.getBlockState(pos).getValue(BotaniaStateProps.COLOR)), currentLight);
|
||||
return LightHelper.getPackedColor(world.getBlockState(pos).getValue(BotaniaStateProps.COLOR), currentLight);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,6 +28,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.crafting.IInfusionStabiliser;
|
||||
@@ -71,7 +72,7 @@ public class BlockFloatingFlower extends BlockModContainer implements ILexiconab
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return 2; // todo
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,9 +11,12 @@
|
||||
package vazkii.botania.common.block.decor;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public interface IFloatingFlower {
|
||||
|
||||
public ItemStack getDisplayStack();
|
||||
@@ -22,7 +25,7 @@ public interface IFloatingFlower {
|
||||
|
||||
public void setIslandType(IslandType type);
|
||||
|
||||
public static enum IslandType {
|
||||
public static enum IslandType implements IStringSerializable {
|
||||
GRASS(LibResources.MODEL_MINI_ISLAND),
|
||||
PODZOL(LibResources.MODEL_MINI_ISLAND_PODZOL),
|
||||
MYCEL(LibResources.MODEL_MINI_ISLAND_MYCEL),
|
||||
@@ -52,6 +55,11 @@ public interface IFloatingFlower {
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name().toLowerCase(Locale.ROOT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -26,6 +27,7 @@ import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
@@ -47,13 +49,6 @@ public class ItemBlockSpecialFlower extends ItemBlockMod implements IRecipeKeyPr
|
||||
|
||||
public ItemBlockSpecialFlower(Block block1) {
|
||||
super(block1);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void onModelBake(ModelBakeEvent evt) {
|
||||
evt.modelRegistry.putObject(new ModelResourceLocation("botania:floatingSpecialFlower", "inventory"), new FloatingFlowerModel());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user