Fixed Bound Sword custom mesh definition so that it isn't registered server-side
This commit is contained in:
parent
ca64ecfc66
commit
22db498592
|
@ -1,11 +1,13 @@
|
||||||
package WayofTime.bloodmagic.proxy;
|
package WayofTime.bloodmagic.proxy;
|
||||||
|
|
||||||
|
import net.minecraftforge.client.model.ModelLoader;
|
||||||
import net.minecraftforge.client.model.obj.OBJLoader;
|
import net.minecraftforge.client.model.obj.OBJLoader;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||||
import net.minecraftforge.fml.client.registry.RenderingRegistry;
|
import net.minecraftforge.fml.client.registry.RenderingRegistry;
|
||||||
import WayofTime.bloodmagic.api.Constants;
|
import WayofTime.bloodmagic.api.Constants;
|
||||||
import WayofTime.bloodmagic.client.helper.ShaderHelper;
|
import WayofTime.bloodmagic.client.helper.ShaderHelper;
|
||||||
|
import WayofTime.bloodmagic.client.mesh.CustomMeshDefinitionActivatable;
|
||||||
import WayofTime.bloodmagic.client.render.RenderAlchemyArray;
|
import WayofTime.bloodmagic.client.render.RenderAlchemyArray;
|
||||||
import WayofTime.bloodmagic.client.render.RenderAltar;
|
import WayofTime.bloodmagic.client.render.RenderAltar;
|
||||||
import WayofTime.bloodmagic.client.render.RenderItemRoutingNode;
|
import WayofTime.bloodmagic.client.render.RenderItemRoutingNode;
|
||||||
|
@ -57,6 +59,7 @@ public class ClientProxy extends CommonProxy
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntitySoulSnare.class, new SoulSnareRenderFactory());
|
RenderingRegistry.registerEntityRenderingHandler(EntitySoulSnare.class, new SoulSnareRenderFactory());
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntitySentientArrow.class, new SentientArrowRenderFactory());
|
RenderingRegistry.registerEntityRenderingHandler(EntitySentientArrow.class, new SentientArrowRenderFactory());
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntityBloodLight.class, new BloodLightRenderFactory());
|
RenderingRegistry.registerEntityRenderingHandler(EntityBloodLight.class, new BloodLightRenderFactory());
|
||||||
|
ModelLoader.setCustomMeshDefinition(ModItems.sentientSword, new CustomMeshDefinitionActivatable("ItemSentientSword"));
|
||||||
ShaderHelper.init();
|
ShaderHelper.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -345,7 +345,6 @@ public class ModItems
|
||||||
|
|
||||||
renderHelper.customItemRender(sentientSword, 0);
|
renderHelper.customItemRender(sentientSword, 0);
|
||||||
renderHelper.customItemRender(sentientSword, 1);
|
renderHelper.customItemRender(sentientSword, 1);
|
||||||
ModelLoader.setCustomMeshDefinition(ModItems.sentientSword, new CustomMeshDefinitionActivatable("ItemSentientSword"));
|
|
||||||
renderHelper.itemRender(sentientBow, 0, "ItemSentientBow");
|
renderHelper.itemRender(sentientBow, 0, "ItemSentientBow");
|
||||||
renderHelper.itemRender(sentientBow, 1, "ItemSentientBow_pulling_0");
|
renderHelper.itemRender(sentientBow, 1, "ItemSentientBow_pulling_0");
|
||||||
renderHelper.itemRender(sentientBow, 2, "ItemSentientBow_pulling_1");
|
renderHelper.itemRender(sentientBow, 2, "ItemSentientBow_pulling_1");
|
||||||
|
@ -367,7 +366,8 @@ public class ModItems
|
||||||
|
|
||||||
private static Item registerItem(Item item)
|
private static Item registerItem(Item item)
|
||||||
{
|
{
|
||||||
if (item.getRegistryName() == null) {
|
if (item.getRegistryName() == null)
|
||||||
|
{
|
||||||
BloodMagic.instance.getLogger().error("Attempted to register Item {} without setting a registry name. Item will not be registered. Please report this.", item.getClass().getCanonicalName());
|
BloodMagic.instance.getLogger().error("Attempted to register Item {} without setting a registry name. Item will not be registered. Please report this.", item.getClass().getCanonicalName());
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue