Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/24/19 in all areas

  1. They have been renamed/moved. updateTick is now called tick. To schedule a tick you call IWorld#getPendingBlockTicks().scheduleTick()
    1 point
  2. You're right, thanks! (看啊,交个朋友?)
    1 point
  3. Well you could read forge's official docs. They are not exactly a tutorial though. Apart from that not really, I haven't seen any good tutorial. Even praised modders like McJty make numerous mistakes in their tutorials and enforce cargo-cult programming. I guess the best way to learn is to consult forge docs, look at some open-source mods that are trustworthy, look at vanilla and ask on these forums. I could recommend some repositories I've looked at and they look fine to me - here, here, here, here is mine. Anyone is also welcome to cotribute their repositories if they want to and they feel confident enough in them. Yeah, this just screams instantinating at wrong time & place. Also it likely calls client-side only code in a common environment which will crash the server. Yeah, this is the outdated way to register your entities. Entities are now registered with EntityEntry which is a IForgeRegistryEntry itself so it has a propper registry event fired for it. Basically subscribe to RegistryEvent.Register<EntityEntry> and use EntityEntryBuilder to register your entities in that event directly. Like this: @SubscribeEvent public static void onEntityRegistry(RegistryEvent.Register<EntityEntry> event) { event.getRegistry().register(EntityEntryBuilder.create().entity(YourEntity.class).id(new ResourceLocation(MODID, NAME), NETWORK_ID).name(NAME).tracker(RANGE, FREQUENCY, SEND_VELOCITY).spawn(EnumCreatureType.WANTED_TYPE, WEIGHT, MIN, MAX, BIOMES).egg(COLOR_FORE, COLOR_BACK).build()); }
    1 point
×
×
  • Create New...

Important Information

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