Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. new EntityLassoWhip(mc.thePlayer.getEntityWorld(), mc.thePlayer); Are you intentionally making a new entity every render tick?
  2. You 100% sure that only that version of Java is available? Have you got good Wifi speeds & the your connection is not blocked in any way java.net.SocketTimeoutException: connect timed out
  3. try disabling any mods that use BrandonsCore
  4. please post entire client & server logs
  5. If your still trying to do this, look at the code from TileEntityFurnace & BlockFurnace. It does exactly what your trying to do
  6. Also, the way I've set up my mod works perfectly for me, but it treats what should be a exclusively server-side code as (mostly) common code. If your planning on adding a lot methods that should only exist on the server you should set up your proxies that way
  7. You might want to have a look at how other people have set up their mods, My mod: https://github.com/Cadiboo/WIPTech/tree/master/src/main/java/cadiboo/wiptech Choonster's Mod: https://github.com/Choonster-Minecraft-Mods/TestMod3 TinkersConstruct (their codes does the job well, but its a bit hard to read and understand sometimes) https://github.com/SlimeKnights/TinkersConstruct/ The Grey Ghost - Minecraft By Example (Oriented around teaching the basics) https://github.com/TheGreyGhost/MinecraftByExample Shadow Facts' Tutorials (VERY useful, if sometimes a bit outdated, disjointed and incomplete) https://shadowfacts.net/tutorials/
  8. Look at how ItemBow does it, Heres how I do it in my flamethrower class, adapt it to your situation float velocity = 0.75F; EntityPlayer entityplayer = (EntityPlayer)entityLiving; if (!worldIn.isRemote) { EntityNapalm entitynapalm = new EntityNapalm(worldIn, player); entitynapalm.shoot(player, player.rotationPitch, player.rotationYaw, 0.0F, velocity, 1.0F); worldIn.spawnEntity(entitynapalm); } worldIn.playSound(null, entityplayer.posX, entityplayer.posY, entityplayer.posZ, SoundEvents.ITEM_FIRECHARGE_USE, SoundCategory.PLAYERS, 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + velocity * 0.5F);
  9. Me too, I can see nothing wrong with any of your code.
  10. I've got a projectile entity that works perfectly, but if I fire it at a speed over about 1-2 once it hits a block it renders back about 3 blocks, after a while (a few seconds before the entity's lifespan runs out) the renderer renders properly - This isn't the fault of my renderer, it happens with forges default white box renderer too, but only at speeds higher than a normal arrow. Ive seen a topic from a long time ago about the same problem (they were rendering an Entity Spear) but they didn't get a solution to it, Im hoping that someone knows the solution to this problem. Tinkers construct seems to have solved this problem by making all their projectiles extend Arrow, but it seems like an inelegant solution and it would be great if there was a better one. EntityRailgunProjectile.java RenderEntityRailgunProjectile.java Screenshots: Renderer renders normally right before the entity is killed
  11. ItemBase.java ItemSchematicSign.java ModItems.java Main.java ModRegistry.java ClientModRegistry.java Reference.java
  12. change @EventBusSubscriber to @Mod.EventBusSubscriber
  13. Try inserting some logging to find out what side it is being called on, what called it etc.
  14. @Stenbergcsgo change @SubscribeEvent public static void onModelRegister(ModelRegistryEvent event) { for(Item item : ModItems.ITEMS) { if(item instanceof IHasModel) { ((IHasModel)item).registerModels(); } } } to @SubscribeEvent public static void registerModels(ModelRegistryEvent event) { for (Item item: ModItems.ITEMS) { ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } }
  15. I don't think that you need IHasModel at all Sorry for not coming back to your topic, I accidentally deleted about 80% of my mods code and had to focus on getting it back
  16. For your anti-AFK, please not that FMLNetworkEvent.ClientConnectedToServerEvent says in its class: Fired at the client when a client connects to a server Its only fired ONCE, so your counter is only ever incremented once Will your mod be on the server that you are connecting to?
  17. My Apologies, I thought they were creating a new Item and instead of using () were using [0], I didn't know that you could create an array this way with such a small amount code,
  18. I believe that their error said that it was failing. Sorry for saying how badly it would fail, I've never seen anything like that before and from my experience it should fail catastrophically
  19. Have you tried adding some logging to see what methods are getting called? I cant see anything wrong with your code, but I'm pretty tired and could easily have missed something
  20. Can you post ClientProxy CommonProxy ModItems ItemPaste RegistryHandler Paste.json Forge Log
  21. No, Registration has to be done on both client and server therefore it is in CommonProxy
  22. WHY WHY WHY NO NO NO should have seen this earlier This fails so many ways 1) apparently cant event turn ModItems.ITEMS into an array maybe because it has to be used like this ModItems.ITEMS.toArray() with nothing inside the () 2) No idea what it would try to do with (new Item[0]), but it would fail absolutely horribly and fatally. Do you know java or any other Object Oriented language? if so you will know that toArray(new Item[0]) is completely non-sensical and guaranteed to crash everything event.getRegistry().registerAll(ModItems.ITEMS);
  23. Please keep in mind that all of this is how I do it, It might not be the best way, but it looks clean and I can't find any problems with it. For me, my common proxy is a mix of RegistryHandler and Common Proxy, and my Client Proxy is pretty much only used for registering models and renders etc
  24. @Mod.EventBusSubscriber public class COMMON_PROXY_OR_SIMILAR { @SubscribeEvent public static void registerItems(RegistryEvent.Register<Item> event) { event.getRegistry().registerAll(Items.ITEMS); } }
  25. Remove this from RegistryHandleer
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.