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

PegBeard

Members
  • Posts

    59
  • Joined

  • Last visited

1 Follower

Converted

  • Gender
    Male

Recent Profile Visitors

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

PegBeard's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  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?
×
×
  • Create New...

Important Information

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