-
Recently Browsing
No registered users viewing this page.
-
Posts
-
I actually figured it out just before you posted this, but thanks anyway!
-
One step ahead? @SubscribeEvent public void clientTickEnd(TickEvent.PlayerTickEvent event){ if (event.phase != Phase.START || event.player == null) return; PlayerEntity player = event.player; Vector3d v3 = player.getLook(1); SmallFireballEntity fireball = new SmallFireballEntity(player.getEntityWorld(), player.getPosX(), player.getPosY() + player.getEyeHeight(), player.getPosZ(), v3.x, v3.y, v3.z); fireball.setShooter(player); player.getEntityWorld().addEntity(fireball); } Should I move it out of @EventBusSubscriber to somewhere else?
-
Alright, where can I learn about the ObsfuscationReflectionHelper and SRG names? (and by register, you mean registering to the VALUES field from the WoodType class?) doesn't this do it? Atlases.SIGN_MATERIALS.put(ModWoodType.EFFETE, new RenderMaterial(Atlases.SIGN_ATLAS, new ResourceLocation("effetewood:entity/signs/effete"))); if it doesn't, can you point me towards how I would write my own renderer?
-
By diesieben07 · Posted
You still need reflection to register it. I don't know. It might be better to just make your own renderer and not use this vanilla stuff. -
I had asked on discord and someone suggested using reflection. but yeah, a subclass is way better This is correct? public class ModWoodType extends WoodType { public static final WoodType EFFETE = new ModWoodType("effete"); protected ModWoodType(String name) { super(name); } } Yeah, you told me that in another thread. But since I don't need to use reflection, I'm going to postpone studying error handling to another week And how should I go about doing that? I tried: @SubscribeEvent public static void modelRegistryEvent(ModelRegistryEvent e) { Atlases.SIGN_MATERIALS.put(ModWoodType.EFFETE, new RenderMaterial(Atlases.SIGN_ATLAS, new ResourceLocation("effetewood:entity/signs/effete"))); } It still doesn't work (The edit screen pops up for less than a second, and appear to have the missing pink/black texture), and the actual block just is invisible (dumb question: I don't need to specify "textures/entity/..." in the resouce location, right?)
-
-
Topics
-
Who's Online (See full list)