mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 02:45:13 +00:00
Safeguard in the smartmodels. Closes #66
This commit is contained in:
1 parent
3d821e5da4
commit
2a077adb6f
2 files changed
+5
No files matched your search
@@ -79,6 +79,8 @@ public class FloatingFlowerModel implements ISmartItemModel, ISmartBlockModel, I
|
||||
|
||||
@Override
|
||||
public IBakedModel handleBlockState(IBlockState state) {
|
||||
if (state.getBlock() != ModBlocks.floatingSpecialFlower && state.getBlock() != ModBlocks.floatingFlower)
|
||||
return Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelManager().getMissingModel();
|
||||
IExtendedBlockState realState = ((IExtendedBlockState) state);
|
||||
IFloatingFlower.IslandType islandType = realState.getValue(BotaniaStateProps.ISLAND_TYPE);
|
||||
String identifier;
|
||||
|
||||
@@ -43,6 +43,7 @@ import org.apache.commons.lang3.tuple.Pair;
|
||||
import vazkii.botania.api.BotaniaAPIClient;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.api.item.IFloatingFlower;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
|
||||
|
||||
import javax.vecmath.Matrix4f;
|
||||
@@ -284,6 +285,8 @@ public class SpecialFlowerModel implements IModelCustomData {
|
||||
|
||||
@Override
|
||||
public IBakedModel handleBlockState(IBlockState state) {
|
||||
if (state.getBlock() != ModBlocks.specialFlower)
|
||||
return Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelManager().getMissingModel();
|
||||
refreshBakedModels();
|
||||
IExtendedBlockState extendedState = ((IExtendedBlockState) state);
|
||||
IBakedModel ret = bakedBlockModels.get(extendedState.getValue(BotaniaStateProps.SUBTILE_ID));
|
||||
|
||||
Reference in new issue
Block a user