Jump to content

DougLazy

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

DougLazy's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Sounds like you're already close to a solution, but I found SimpleNetworkWrapper nice to use. create a SimpleNetworkWrapper, something like: SimpleNetworkWrapper simpleNetworkWrapper = NetworkRegistry.INSTANCE.newSimpleChannel("myChannel"); You will need to use that to register a message class, I did this in postinit like: simpleNetworkWrapper.registerMessage(MyMessageHandler.class, MyMessage.class, 0, Side.CLIENT); Declarations such as: MyMessage implements IMessage MyMessageHandler implements IMessageHandler<MyMessage, IMessage> For an example see the comment =~ line 62 of net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.java Finally you send the message from the server like this: simpleNetworkWrapper.sendToDimension(new MyMessage(myConfigurationSettings), 0); Which will fire the MyMessageHandler.onMessage on any client attached to that server that is in the Overworld (That's the 0). You would have to repeat this for the Nether (-1) and The End (1) if that was important. IMessage defines a dead simple ByteBuf serialization pattern which is where you'd convert your settings to something transportable. toBytes(ByteBuf buf) fromBytes(ByteBuf buf) 0d
  2. I guess the core concept that relates can be simplified to this behavior: The player drops sand and it falls longer than some threshold (say 64 blocks), when it lands I check the block it lands on and transform that block based on some made up mappings I'm playing with. So I think I can do this with my own sand, but I can't see a straight forward route with the vanilla sand.
  3. Hey I'm going through my options, to hook into BlockFalling. To describe my need, it would be solved, for example, if forge had an event for BlockFalling descendants like: @SubscribeEvent public void onStartedFalling(BlockFallingEvent.FallStartedEvent event) { } (And the EndFalling of course.) This would allow me to write code as if I'm in BlockSand.onStartFalling(EntityFallingBlock fallingEntity), but there are other ways. My three options: 1. Write that new BlockFallingEvent class and PR into Forge itself, seems possible, but I've no idea. 2. Instead unregister vanilla BlockSand and register my own. Like in this post. 3. Go down the ASM route, which seems like both overkill and a bad idea in general. Are there other options before I go for #2 ? I don't think #1 is realistic for me for the moment. Thanks, 0d
  4. I'm just taking a stab at this. I think you're talking more about packaging an existing mod for use, this is what a ModPack is. Try searching for custom ModPack creation and configuration.
  5. Very cool, thank you!
  6. I'm toying with adding a dimension to my mod. I'd like the dimension to be from an existing limited map, no seed/generation rules needed. Picture a sky island, for example. Before I start writing a custom IWorldGenerator to solve this, I thought there might be a solution, or a way to simplify the process. One thought I had was to use a structure_block, maybe subclassed to bypass the 32x32x32 limit. Thanks in advance. 0d
×
×
  • Create New...

Important Information

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