Jump to content

Insane96MCP

Members
  • Posts

    211
  • Joined

  • Last visited

Everything posted by Insane96MCP

  1. I have this simple event public static void oreXpDrop(BlockEvent.BreakEvent event) { int xpToDrop = event.getExpToDrop(); IguanaTweaksReborn.LOGGER.info(xpToDrop); xpToDrop *= ModConfig.Experience.oreMultiplier.get(); //2.5d IguanaTweaksReborn.LOGGER.info(xpToDrop); event.setExpToDrop(xpToDrop); } The log shows that experience has been increased and more orbs spawn from the block, but when I pick them up, they are empty and the effectively picked up experience is the original one.
  2. I'm making a simple mod to make animals attack players much like zombie pigmen ... the problem is that when an animal attacks the player the game crashes ... No problem: stacktrace and I'll debug ... well the problem is that the stack trace points to a row that's not in the correct method and it's driving me crazy. I've tried refreshing gradle and regen intellijruns but no fix. MobEntity.java:1164 points to recreateLeash and not attackEntityAsMob (I'm using IntelliJ)
  3. Yeah, try to avoid website like 9minecraft or similar: https://stopmodreposts.org/
  4. I've made a server for my modpack and rarely the log files gets as 6GB as big. That's because sometimes it gets filled with [17:43:22] [Netty Epoll Server IO #8/ERROR] [FML]: NetworkDispatcher exception io.netty.channel.unix.Errors$NativeIoException: syscall:writev(..) failed: Broken pipe at io.netty.channel.unix.FileDescriptor.writeAddresses(..)(Unknown Source) ~[minecraft_server.1.12.2.jar:?] and [18:09:10] [Netty Epoll Server IO #17/ERROR] [FML]: NetworkDispatcher exception io.netty.channel.unix.Errors$NativeIoException: writevAddresses(..) failed: Connection timed out at io.netty.channel.unix.Errors.newIOException(Errors.java:117) ~[minecraft_server.1.12.2.jar:?] at io.netty.channel.unix.Errors.ioResult(Errors.java:138) ~[minecraft_server.1.12.2.jar:?] at io.netty.channel.unix.FileDescriptor.writevAddresses(FileDescriptor.java:152) ~[minecraft_server.1.12.2.jar:?] at io.netty.channel.epoll.AbstractEpollStreamChannel.writeBytesMultiple(AbstractEpollStreamChannel.java:305) ~[minecraft_server.1.12.2.jar:?] at io.netty.channel.epoll.AbstractEpollStreamChannel.doWriteMultiple(AbstractEpollStreamChannel.java:532) ~[minecraft_server.1.12.2.jar:?] at io.netty.channel.epoll.AbstractEpollStreamChannel.doWrite(AbstractEpollStreamChannel.java:469) ~[minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:856) [minecraft_server.1.12.2.jar:?] at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:478) [minecraft_server.1.12.2.jar:?] at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollOutReady(AbstractEpollStreamChannel.java:947) [minecraft_server.1.12.2.jar:?] at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:384) [minecraft_server.1.12.2.jar:?] at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:299) [minecraft_server.1.12.2.jar:?] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [minecraft_server.1.12.2.jar:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111] And I really don't know what's causing this to happen. This mostly happens when a player can't connect. As the log is spammed with those, the player can finally log again.
  5. Uhm, seems like the texture id is still taken from the block's resource location.
  6. I'm making a simple mod to have decorative ores. I would like to have this thing dynamically, so you can add ores by adding the Id via config. E.g. The config would look like "Ore to create decoration block" S: decorationOre < minecraft:coal_ore > This would create a new block named JASBTweaks:decorative_ore_minecraft_coal_ore. The problem is I really don't know how to get the textures for the block, since I need to use the original ones and need to be applied via code. This is the DecorativeOre Class: public class BlockDecorativeOre extends Block{ public String oreId; public short oreMeta; public BlockDecorativeOre(String oreId, short oreMeta, String translationKey) { super(Material.ROCK); this.oreId = oreId; this.oreMeta = oreMeta; setRegistryName(new ResourceLocation(JASBTweaks.MOD_ID, "decorative_ore_" + oreId.replace(":", "_") + "_" + oreMeta)); setTranslationKey(translationKey); setCreativeTab(CreativeTabs.DECORATIONS); setHardness(1.5f); setResistance(5.0f); setHarvestLevel("pickaxe", 0); ModBlocks.BLOCKS.add(this); } } So when the config is loaded I can register the block like List<BlockDecorativeOre> decorativeOres = new ArrayList<DecorativeOre>(); public void onConfigLoad() { for (int i = 0; i < config.decorativeOres.length; i++) { //Get all the meta etc. decorativeOres.add(new DecorativeOre(name, meta, translationKey); } } The translation key part will surely be treated in another way.
  7. As you already said 1.7.10 is no longer supported.
  8. I'm trying to change player health on respawn but it's not working. https://github.com/Insane-96/IguanaTweaksReborn/blob/1.13/common/net/insane96mcp/iguanatweaks/modules/ModuleSleepRespawn.java#L175 Even tried damaging the player or adding a poison effect to him but the damage is not applied and the poison effect is applied but only client side (I can see the poisoned hearts but damage is not applied and the effect never wears off, I thought that the effect is only client side). Adding a logger.info mentions Server thread/INFO in the log
  9. I have a new enchantment that shouldn't be available on books isAllowedOnBooks already returns false, but the enchantment can be still found in villagers trades. There's anyway to prevent this to happen? Found the culprit: In EntityVillager.ListEnchantedBookForEmeralds.addMerchantRecipe() it gets the Enchantment registry and gets a random enchantment off all the ones registered so unless using ASM (I think) there's no way to fix this.
  10. There's anyway to check if PvP is enabled in the world? Searching for a way to check PvP even in teams (/scoreboard teams option <team_name> friendlyFire) EDIT: Found EntityPlayer#canAttackPlayer
  11. I just tried copy-paste your code HAHHAHAHHAA Btw yeah, I would like to understand why all this needs to be done
  12. I don't understand why I need to translate
  13. I'm pretty sure I already have the right position
  14. Ok, managed to draw in the event but the nameplate still doesn't show for some reasons. I might be missing something https://github.com/Insane-96/XpHolder/blob/2.1/common/net/insane96mcp/xpholder/events/RenderWorldLast.java#L34
  15. Ok, I tried sending a packet from server when player looks at the tile entity that should show a nameplate like vanilla one, but there's some strange behaviour. The sky flickers everytime a packet is received and the nameplate doesn't show. That's the packet handler https://github.com/Insane-96/XpHolder/blob/2.1/common/net/insane96mcp/xpholder/network/GetXpStored.java#L49 The position and the amount is received correctly.
  16. I would like to draw something like the player xp bar in the world when the player looks at a tile entity. I got the part to look at tile entity and right now I just show an actionbar text, but I would like to make things prettier.
  17. Shouldn't EntityPlayerMP#getCooledAttackStrength return a number between 0 and 1 based on the attack cooldown of the player? (e.g. spamming should return near 0 values) I always get 0. Plus I don't understand what the parameter adjustTicks does. EDIT: forgot to mention that I'm calling it in LivingAttackEvent, maybe here the cooldown has been already reset
  18. I've set up a recipe where you can upgrade diamond armor (any durability, any enchantment), keeping nbt (thanks Choonster). The problem is that the Recipe Book only shows the recipe when you have a non-damaged and non-enchanted armor. This is the recipe implementation: https://github.com/Insane-96/CarbonadoMod/blob/1.12.1/common/net/insane96mcp/carbonado/crafting/recipe/DiamondUpgrade.java
  19. I've recently read that as forge build 2744 a swim speed attribute has been added. I've updated forge to the latest stable 2768, but can't seem to find the attribute as SharedMonsterAttributes.SWIM_SPEED. Edit: Seems like the attribute is in as EntityLivingBase.SWIM_SPEED
  20. With this the problem is that if I have lots of properties I have to double them.
  21. I'm having some slight problems reverting config back on logout. I have this event: @SubscribeEvent public static void EventClientDisconnectionFromServer(ClientDisconnectionFromServerEvent event) { Properties.config = Properties.localConfig; System.out.println(Arrays.toString(Properties.config.hardness.blockHardness) + " " + Arrays.toString(Properties.localConfig.hardness.blockHardness)); } The problem is that for some reasons the localConfig is changed to the server config too, without anyone touching it. (https://github.com/Insane-96/IguanaTweaksReborn/blob/master/common/net/insane96mcp/iguanatweaks/lib/Properties.java#L26 https://github.com/Insane-96/IguanaTweaksReborn/blob/master/common/net/insane96mcp/iguanatweaks/network/ConfigSync.java#L54) My guess is that since ConfigOptions is static, changing the config object, changes the one in localConfig too.
  22. Depends on the modpack / amount of mods
×
×
  • Create New...

Important Information

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