mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 11:49:37 +00:00
Fix server crash
This commit is contained in:
3 files changed
+17
-5
No files matched your search
@@ -12,6 +12,7 @@ package vazkii.botania.client.core.proxy;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.multiplayer.PlayerControllerMP;
|
||||
import net.minecraft.client.network.NetHandlerPlayClient;
|
||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||
@@ -167,6 +168,11 @@ public class ClientProxy extends CommonProxy {
|
||||
public static boolean jingleTheBells = false;
|
||||
public static boolean dootDoot = false;
|
||||
|
||||
private static final ModelBiped EMPTY_MODEL = new ModelBiped();
|
||||
static {
|
||||
EMPTY_MODEL.setInvisible(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
PersistentVariableHelper.setCacheFile(new File(Minecraft.getMinecraft().mcDataDir, "BotaniaVars.dat"));
|
||||
@@ -497,5 +503,10 @@ public class ClientProxy extends CommonProxy {
|
||||
public int getClientRenderDistance() {
|
||||
return Minecraft.getMinecraft().gameSettings.renderDistanceChunks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelBiped getEmptyModelBiped() {
|
||||
return EMPTY_MODEL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,4 +338,8 @@ public class CommonProxy {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Object getEmptyModelBiped() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -30,6 +30,7 @@ import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
@@ -37,9 +38,6 @@ import javax.annotation.Nonnull;
|
||||
|
||||
public class ItemGaiaHead extends ItemMod {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static final ModelBiped EMPTY = new ModelBiped();
|
||||
|
||||
public ItemGaiaHead() {
|
||||
super(LibItemNames.GAIA_HEAD);
|
||||
}
|
||||
@@ -53,8 +51,7 @@ public class ItemGaiaHead extends ItemMod {
|
||||
@Nonnull
|
||||
@Override
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, EntityEquipmentSlot armorSlot, ModelBiped _default) {
|
||||
EMPTY.setInvisible(true);
|
||||
return EMPTY;
|
||||
return (ModelBiped) Botania.proxy.getEmptyModelBiped();
|
||||
}
|
||||
|
||||
// Copied from vanila skull itemBlock. Relevant edits are indicated.
|
||||
|
||||
Reference in new issue
Block a user