Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/19/22 in all areas

  1. Not to the vanilla overworld. Things you can do include; * override/replace the vanilla overworld using the datapack mechanism - not recommended for a mod to do by default * use a WorldPreset to create a new "world type" that appears in the "create new world screen" and has a copy of the vanilla overworld with your biome included * use an existing library mod like: https://www.curseforge.com/minecraft/mc-mods/terrablender There are probably other options along similar lines.
    1 point
  2. It's a file in the logs folder of your game directory. The file can also be named debug if you have file extensions disabled. If you using CurseForge you need to enable the debug.log in the settings.
    1 point
  3. Issue with byg (or one of your resource packs) This is not the latest version: https://www.curseforge.com/minecraft/mc-mods/oh-the-biomes-youll-go/files/all?filter-game-version=1738749986%3a73250 If that doesn't fix it, contact the mod author.
    1 point
  4. Could you provide some examples? I'm simply using mixins because I know it works and I've seen many examples of people using them to successfully create packet events: https://github.com/Hexeption/Nitro-Client/blob/master/src/main/java/uk/co/hexeption/client/mixin/mixins/MixinNetworkManager.java, https://github.com/cabaletta/baritone/blob/master/src/launch/java/baritone/launch/mixins/MixinNetworkManager.java, https://git.liquidbounce.net/CCBlueX/LiquidBase/blob/4b53d25e2893dbc5521d9a831a652b792f7803ea/src/main/java/net/ccbluex/liquidbase/injection/mixins/MixinNetworkManager.java, https://www.programcreek.com/java-api-examples/?code=ImpactDevelopment/ClientAPI/ClientAPI-master/src/main/java/clientapi/load/mixin/MixinNetworkManager.java, http://codingdict.com/sources/java/net.minecraft.network/53728.html
    1 point
  5. I’d welcome any examples of a better way to do this?
    1 point
  6. For anyone else looking for this in the future, create mixins for net.minecraft.network.NetworkManager like so: @Inject(method = "sendPacket(Lnet/minecraft/network/Packet;)V", at = @At("HEAD"), cancellable = true) private void onSendPacket(Packet<?> packet, CallbackInfo callbackInfo) { //System.out.println("Packet Sent: " + packet.toString()); PacketSent event = new PacketSent(packet); MinecraftForge.EVENT_BUS.post(event); if (event.isCanceled() && callbackInfo.isCancellable()) { callbackInfo.cancel(); } packet = event.packet; } @Inject(method = "channelRead0", at = @At("HEAD"), cancellable = true) private void onChannelRead(ChannelHandlerContext context, Packet<?> packet, CallbackInfo callbackInfo) { //System.out.println("Packet Recieved: " + packet.toString()); PacketRecieved event = new PacketRecieved(packet); MinecraftForge.EVENT_BUS.post(event); if (event.isCanceled() && callbackInfo.isCancellable()) { callbackInfo.cancel(); } packet = event.packet; } PacketSent and PacketRecieved are custom events that you can make yourself by making a class that extends Event.
    1 point
  7. The normal way to damage the Item would be ItemStack#hurtAndBreak. The animation is done via LivingEntity#broadcastBreakEvent which will be called from the Consumer of #hurtAndBreak. stack.hurtAndBreak(1, player, (p) -> { p.broadcastBreakEvent(EquipmentSlot.MAINHAND); // This will send the animation to the client });
    0 points
×
×
  • Create New...

Important Information

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