Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

PegBeard

Members
  • Posts

    59
  • Joined

  • Last visited

Everything posted by PegBeard

  1. Oh. Is that something that changed since 1.8, or was the tutorial I followed back then wrong? edit: the removeTileEntity was just testing for this issue, didn't intend to keep it.
  2. I have a dispenser behaviour class, which is registered in the postInit: Is this correct? I looked it up back in 1.8, and assumed this was still relevant, as my other dispenser behaviours still work.
  3. I was messing around with dispenser behaviour and found that if the dispenser is replaced/destroyed/otherwise removed while dispensing, the game crashes with this in the log: What happened to cause this is pretty simple - I made the dispensed stack cause an explosion, however, I get the same result if I set the dispenser to a different block (air, for example). I have tried removing the tile entity before setting the block to air and/or causing the explosion, but the result is the same. Is there any way I can prevent this crash, other than delaying the explosion?
  4. I did update earlier today - just wanted to make sure it wasn't something wrong on my end. Thanks.
  5. Since up dating to 1.12; while loading a world (new or old) , I get an issue where the game begins loading the world but freezes on the dirt screen, displaying '0%'. The next time I go to load that same world, player data has been reset, as if joining the world for the first time. Checking world files, the player data is still there, but a new file has been made for the effected player. Because the game does not actually crash, I don't have a lot to go on for what is causing this, but last time it happened I did manage to spot this in the log: [19:08:14] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 5 mods : minecraft@1.12,FML@8.0.99.99,forge@14.21.1.2406,dungeontactics@DT-0.12.7,mcp@9.19 [19:08:14] [Netty Local Client IO #0/ERROR] [FML]: HandshakeMessageHandler exception java.lang.ClassCastException: net.minecraftforge.fml.common.network.handshake.FMLHandshakeMessage$ServerHello cannot be cast to net.minecraftforge.fml.common.network.handshake.FMLHandshakeMessage$ModList at net.minecraftforge.fml.common.network.handshake.FMLHandshakeClientState$3.accept(FMLHandshakeClientState.java:99) ~[FMLHandshakeClientState$3.class:?] at net.minecraftforge.fml.common.network.handshake.FMLHandshakeClientState$3.accept(FMLHandshakeClientState.java:94) ~[FMLHandshakeClientState$3.class:?] at net.minecraftforge.fml.common.network.handshake.HandshakeMessageHandler.channelRead0(HandshakeMessageHandler.java:48) ~[HandshakeMessageHandler.class:?] at net.minecraftforge.fml.common.network.handshake.HandshakeMessageHandler.channelRead0(HandshakeMessageHandler.java:30) ~[HandshakeMessageHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[SimpleChannelInboundHandler.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) [MessageToMessageDecoder.class:4.1.9.Final] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final] at net.minecraftforge.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:55) [ChannelRegistrationHandler.class:?] at net.minecraftforge.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:38) [ChannelRegistrationHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [SimpleChannelInboundHandler.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [DefaultChannelPipeline$HeadContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [DefaultChannelPipeline.class:4.1.9.Final] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:274) [EmbeddedChannel.class:4.1.9.Final] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:390) [NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:274) [NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:74) [NetworkDispatcher.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [SimpleChannelInboundHandler.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [DefaultChannelPipeline$HeadContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [DefaultChannelPipeline.class:4.1.9.Final] at io.netty.channel.local.LocalChannel.finishPeerRead0(LocalChannel.java:443) [LocalChannel.class:4.1.9.Final] at io.netty.channel.local.LocalChannel.access$500(LocalChannel.java:49) [LocalChannel.class:4.1.9.Final] at io.netty.channel.local.LocalChannel$5.run(LocalChannel.java:397) [LocalChannel$5.class:4.1.9.Final] at io.netty.channel.DefaultEventLoop.run(DefaultEventLoop.java:54) [DefaultEventLoop.class:4.1.9.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [SingleThreadEventExecutor$5.class:4.1.9.Final] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131] [19:08:14] [Netty Local Client IO #0/ERROR] [FML]: NetworkDispatcher exception java.lang.ClassCastException: net.minecraftforge.fml.common.network.handshake.FMLHandshakeMessage$ServerHello cannot be cast to net.minecraftforge.fml.common.network.handshake.FMLHandshakeMessage$ModList at net.minecraftforge.fml.common.network.handshake.FMLHandshakeClientState$3.accept(FMLHandshakeClientState.java:99) ~[FMLHandshakeClientState$3.class:?] at net.minecraftforge.fml.common.network.handshake.FMLHandshakeClientState$3.accept(FMLHandshakeClientState.java:94) ~[FMLHandshakeClientState$3.class:?] at net.minecraftforge.fml.common.network.handshake.HandshakeMessageHandler.channelRead0(HandshakeMessageHandler.java:48) ~[HandshakeMessageHandler.class:?] at net.minecraftforge.fml.common.network.handshake.HandshakeMessageHandler.channelRead0(HandshakeMessageHandler.java:30) ~[HandshakeMessageHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[SimpleChannelInboundHandler.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) ~[MessageToMessageDecoder.class:4.1.9.Final] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at net.minecraftforge.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:55) ~[ChannelRegistrationHandler.class:?] at net.minecraftforge.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:38) ~[ChannelRegistrationHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[SimpleChannelInboundHandler.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) ~[DefaultChannelPipeline$HeadContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) ~[DefaultChannelPipeline.class:4.1.9.Final] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:274) ~[EmbeddedChannel.class:4.1.9.Final] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:390) ~[NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:274) ~[NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:74) ~[NetworkDispatcher.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[SimpleChannelInboundHandler.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [DefaultChannelPipeline$HeadContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [DefaultChannelPipeline.class:4.1.9.Final] at io.netty.channel.local.LocalChannel.finishPeerRead0(LocalChannel.java:443) [LocalChannel.class:4.1.9.Final] at io.netty.channel.local.LocalChannel.access$500(LocalChannel.java:49) [LocalChannel.class:4.1.9.Final] at io.netty.channel.local.LocalChannel$5.run(LocalChannel.java:397) [LocalChannel$5.class:4.1.9.Final] at io.netty.channel.DefaultEventLoop.run(DefaultEventLoop.java:54) [DefaultEventLoop.class:4.1.9.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [SingleThreadEventExecutor$5.class:4.1.9.Final] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131] I have tried running my mod with various parts disabled and still get the issue. So I am not sure if it is something to do with my installation, if I have done something improperly, or if it is something with forge. Any help would be greatly appreciated.
  6. I recently switched to using the registry event, for my blocks and items. This is working fine, but I noticed that I am getting a 'Dangerous alternative prefix' warning when running my mod with virtually any other mod. I'm no expert, but it seems like, when another mod registers items, etc, the event fires and my mod is registering content in the middle of the other mod. I say this because: Dangerous alternative prefix `dungeontactics` for name `dungeonpedia`, expected `forestry` invalid registry invocation/invalid name? This seems to indicate that forge is expecting, in this case, a registry from forestry, but is getting mine instead. I have been told that this is just a warning and I don't need to worry about it, but I was wondering if there is anything I can do about it - preferably prevent what is causing the warning, not just hide it from the log.
  7. This is the first time I have done meta items. Everything works, except the first subitem appears in in the creative inventory 'Delete Item' slot, and at the end of every creative tab. For testing purposes, I stripped the class down to the essentials, but the error persists. public static ItemStack item1; public static ItemStack item2; public DTTest(String name) { this.setUnlocalizedName(Reference.MOD_ID + ":" + name); this.setCreativeTab(DTCreativeTab.DT_TAB); this.setMaxDamage(0); setContainerItem(this); setHasSubtypes(true); item1 = new ItemStack(this); item1.setItemDamage(0); item2 = new ItemStack(this); item2.setItemDamage(1); } @SideOnly(Side.CLIENT) @Override public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> items) { items.add(item1); items.add(item2); } The item is registered thusly, and called during preInit (haven't switched to events yet): public static Item test = new DTTest(Names.Items.TEST); ForgeRegistries.ITEMS.register(test.setRegistryName(Names.Items.TEST));
  8. It was identical to the code shown above, but in the onItemUseFirst method. So I didn't want to over complicate the original post. @Override public EnumActionResult onItemUseFirst(EntityPlayer player, World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, EnumHand hand) { if (hand == EnumHand.OFF_HAND) { return EnumActionResult.FAIL; } Block block = world.getBlockState(pos).getBlock(); if (!player.canPlayerEdit(pos, facing, player.getHeldItem(hand))) { return EnumActionResult.PASS; } if (block.getValidRotations(world, pos) != null) { if (!player.capabilities.isCreativeMode) { player.getHeldItem(hand).damageItem(1, player); } block.rotateBlock(world, pos, facing); SoundType soundtype = block.getSoundType(world.getBlockState(pos), world, pos, player); world.playSound(player, pos, soundtype.getHitSound(), SoundCategory.BLOCKS, soundtype.getVolume() * 0.5F, soundtype.getPitch() * 0.75F); player.swingArm(hand); return EnumActionResult.SUCCESS; } return EnumActionResult.PASS; } When doing the rotation this way, it appears to rotate, but when the block is updated, it reverts the rotation.
  9. Not meaning to sound rude, but I had figured that much out and it doesn't really answer my question. Are you saying that there is no good way to get the rotation to stick when using onItemUseFirst and no good way to give my item preference with onItemUse except when sneaking? I don't mind sticking with onItemUse and sneaking, I am just curious if there is a way to do what I am asking, for versatility reasons.
  10. I have created a wrench item. When right-clicking a rotatable block, such as a piston, with said wrench, it rotates the block. This works fine but; If I rotate the block during 'onItemUse' and the block has an inventory, the inventory is shown - is there a way I can stop that but still rotate the block? If I rotate the block during 'onItemUseFirst' no gui is opened but the block resets after a block update - is there a way to make the rotation stick, or is this just the wrong place to do the rotation. I have my own rotate code, but for testing purposes I am just using the default method and still getting the results stated above: @Override public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if (hand == EnumHand.OFF_HAND) { return EnumActionResult.FAIL; } Block block = world.getBlockState(pos).getBlock(); if (!player.canPlayerEdit(pos, facing, player.getHeldItem(hand))) { return EnumActionResult.PASS; } if (block.getValidRotations(world, pos) != null) { if (!player.capabilities.isCreativeMode) { player.getHeldItem(hand).damageItem(1, player); } block.rotateBlock(world, pos, facing); SoundType soundtype = block.getSoundType(world.getBlockState(pos), world, pos, player); world.playSound(player, pos, soundtype.getHitSound(), SoundCategory.BLOCKS, soundtype.getVolume() * 0.5F, soundtype.getPitch() * 0.75F); player.swingArm(hand); return EnumActionResult.SUCCESS; } return EnumActionResult.PASS; }
  11. When using the ore dictionary to supply the 'inventory_changed' trigger, the advancement is given for any item, not just the specified ore/ingot type. Could we get ore dict compatibility for advancements.
  12. I have some extra weapons in my mod, made from common modded resources. The crafting recipes work fine (using the ore dictionary), but I was wondering if the recipe could be unlocked using the ore dictionary. As shown below, attempting to use an ore_dict ore in this way grants the recipe when the player picks up any item (not just the specified 'ore'). { "parent": "minecraft:recipes/root", "rewards": { "recipes": [ "dungeontactics:weapons/extra_materials/steel_knife" ] }, "criteria": { "has_item": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "type": "forge:ore_dict", "ore": "ingotSteel" } ] } } } } I have also tried changing the "items" (under "conditions") to "types", but this yielded the same result. Is it possible to achieve this?
  13. Didn't find anything on the old googles, but I was wondering if we are gonna get an event for when a player triggers an advancement, to replace the achievement event in 1.12? Also, would it be possible to differentiate between advancements that do and don't announce to chat/display an on-screen tab?
  14. I forgot to change my environment variables. All sorted now.
  15. I know that 52 is java 8, but that's what I have installed. I removed old versions when I updated the jre and jdk, so as far as I can tell, java 8 is the only version I have installed. Do I have to change something on my system to make sure gradle is actually using java 8?
  16. I recently updated my JRE and JDK to 8u131 (see attached image). I had no problem with 1.11.2, but when trying to setup the workspace for 1.12 I get an unsupported major.minor version 52.0 error. I know this means there is a version discrepancy, but I don't know which version of java I need.
  17. Just fixed it - I had an extra '/' in the resource path. Don't know how it got there, but it's weird that it worked in 1.10 but not 1.11
  18. I am getting this in the console, on load: Everything is lowercase and the textures are in the specified location - as I mentioned, everything was working in 1.10, my code hasn't changed and the textures haven't been moved/renamed either
  19. The code I have worked in 1.10.2, so I know everything is labelled properly and the texture is in the right place, but in 1.11.2 the potion icon in the player's inventory and on the HUD renders the missing texture. I have looked for any changes, but everything I have found just confirms what I already have. This is my current code (nothing flash, just what I got from a tutorial): My potion effects are being registered in the PreInit and the effects work properly, and the localised names are correct, so I assume there is something wrong with the resource path, but it worked as it is in 1.10 and I am not sure what changed. Any help would be appreciated.
  20. Ohhh. I completely misread that part earlier. Thank ye kindly.
  21. I want to spawn a firework when the player rightclicks with an item. I have looked at the firework item, the firework entity, and the crafting code. Which has gotten me to this point (code below). The problem I am having is that the firework has no effect, just shoots up with a trail then disappears. ItemStack firework = new ItemStack(Items.FIREWORKS); NBTTagCompound nbttagcompound1 = new NBTTagCompound(); NBTTagCompound nbttagcompound2 = new NBTTagCompound(); List<Integer> list = Lists.<Integer>newArrayList(); list.add(Integer.valueOf(ItemDye.DYE_COLORS[0 & 15])); list.add(Integer.valueOf(ItemDye.DYE_COLORS[14 & 15])); int[] aint1 = new int[list.size()]; for (int l2 = 0; l2 < aint1.length; ++l2) { aint1[l2] = ((Integer)list.get(l2)).intValue(); } nbttagcompound2.setIntArray("Colors", aint1); nbttagcompound2.setBoolean("Flicker", true); nbttagcompound1.setTag("Explosion", nbttagcompound2); firework.setTagCompound(nbttagcompound1); EntityFireworkRocket rocket = new EntityFireworkRocket(world, player.posX, player.posY + 0.5F, player.posZ, firework); world.spawnEntityInWorld(rocket); return new ActionResult(EnumActionResult.SUCESS, stack); I have tried dropping the item (player.entityDropItem(firework)), which shows that it does have an NBTtag, but the tag doesn't add anything to the items display information, nor does it add an effect to the firework. Interestingly, if I change the ItemStack to a firework_charge, the NBTtags do work. They add the info and can be crafted into a regular firework. Is there a specific method for adding NBT to fireworks, similar to how you add enchantments to books, or am I just doing it wrong? P.S. I know the code isn't pretty, but I am just trying to brute force it, until I can get it working, then I will do the appropriate checks and conditions.
  22. I wouldn't know, why don't you test it? But I hazard to guess that the success will depend on the size of your structure.
  23. You are setting you structure bounds to the size of the chunk, but your rotation is random. So your structure can generate partially outside of the chunk and outside the bounds.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.