Jump to content

Choonster

Moderators
  • Posts

    5160
  • Joined

  • Last visited

  • Days Won

    76

Everything posted by Choonster

  1. Extend CommandBase, implement IClientCommand and register it by calling CommandHandler#registerCommand on ClientCommandHandler.instance.
  2. BlockFire.init sets the flammability and spread speed of vanilla Blocks.
  3. TileEntity#getUpdateTag is called when a Chunk is being sent to players and the returned compound tag is included in the SPacketChunkData. ChunkWatchEvent.Watch is fired when a player starts watching a Chunk, directly after the SPacketChunkData has been sent.
  4. You're overriding expanded:dark_oak_bed_item (i.e. registering a new value with the same name), but the old value doesn't have an OverrideOwner associated with it. If I understand Forge's registry code correctly, this would happen when the new value has the same owner (mod ID) as the old one (because the new OverrideOwner and value replace the old OverrideOwner and value in the ForgeRegistry#owners BiMap). Are you registering this Item in multiple places? As Draco said, we need to see more of your code.
  5. Post your code, specifically where you register an override of a vanilla registry entry. Also post the FML log so we can see exactly what the message is warning about. This is related to the new override system provided by Forge's registries, which replaces the old substitution alias system. It's not related to overriding a method.
  6. ItemStacks can be null in 1.10.2 and earlier, so your ItemStackHandler#insertItem override should be annotated with @Nullable, not @Nonnull. This also applies to the ItemStack parameter. It's only in 1.11 and later that ItemStacks can't be null. This particular crash is triggered by IDEA's automatic runtime null-checking. For methods that you control, fix the annotations or the code so that @Nonnull methods don't return null values. For methods that you don't control, you can disable the null-checking as described here.
  7. What do you mean? Do you know how to override a method? If the flammability/spread speed is always the same, you can simply return a constant value and ignore the arguments.
  8. Please include the files required to build the mod in the repository: build.gradle, gradlew, gradlew.bat and the gradle directory.
  9. TileEntity#shouldRefresh has nothing to with whether Block#onBlockPlaced or Block#onBlockAdded are called, so I'm not sure why that's happening. The default behaviour of TileEntity#shouldRefresh for non-vanilla TileEntities is actually the same as what you had in FruityTileEntity(return true when the IBlockState changes), so removing the override shouldn't have changed anything.
  10. FruityTileEntity overrides TileEntity#shouldRefresh to return true when the IBlockState has changed, not when the Block has changed. If you put a breakpoint in BlockBoiler#createNewTileEntity with the condition worldIn.isRemote (i.e. the method is being called on the logical client), can you see what's causing the new TileEntity to be created? Side note: Don't use ITileEntityProvider, override Block#hasTileEntity(IBlockState) and Block#createTileEntity instead.
  11. Most of the deprecated methods in the Block class are deprecated because they should be overridden, but not called. Call the equivalent methods in IBlockProperties (which IBlockState extends) instead. Don't include block/ in the blockstates file's model locations, Minecraft automatically adds that. I explain how model locations are mapped to model files here. I believe BlockTorch only does its sate/metadata conversions in that way to maintain compatibility with the original metadata values, which aren't the same as the facing indexes uses in other parts of the game. For your own block, use EnumFacing#getIndex and EnumFacing.getFront instead. See BlockObserver for a simple example of this. To create a PropertyDirection that accepts all EnumFacing values, you can use the overload of PropertyDirection.create without a Predicate argument. If you say that it doesn't work even without the block/ prefixes in the blockstates file, I'm not sure exactly what the problem is here. Could you create a Git repository of your mod (if you haven't already) and link it here? See my mod and its .gitignore file for an example of the repository structure and which files to include.
  12. You're still using 1.7.10, which isn't supported here.
  13. Upload the FML log (logs/fml-client-latest.log in the game directory) to Gist or Pastebin and link it here.
  14. Play on a newer version (recommended) or ask for help somewhere else (e.g. Minecraft Forum).
  15. 1.7.10 is no longer supported on this forum. Update if you want help.
  16. Post the full stacktrace. I suspect it's being thrown because the channel name of your SimpleNetworkWrapper is too long. When you send a client-to-server IMessage, it's converted to a CPacketCustomPayload with your SimpleNetworkWrapper's channel name. This channel name is limited to 20 characters by CPacketCustomPayload#readPacketData. Server-to-client IMessages are converted to SPacketCustomPayload, which also has this restriction.
  17. This model has a syntax error. This blockstates file has a syntax error. This item model doesn't exist.
  18. I said to create a method to get the client World, i.e. Minecraft#world. You can only reference Minecraft in the client proxy, you can throw an exception from the server proxy. I have an example of this in my mod's proxy classes.
  19. Upload the FML log (logs/fml-client-latest.log in the game directory) to Gist or Pastebin and link it here.
  20. From where? If you're talking about the methods where you were using the client World, I already explained how to get the proper World.
  21. Any World on the logical server (when World#isRemote is false) will be a WorldServer. World#getMinecraftServer will return the MinecraftServer instance (if it's a server-side World).
  22. 1.7.10 is no longer supported on this forum, update if you want help.
  23. Upload the FML log (logs/fml-client-latest.log in the game directory) to Gist or Pastebin and link it here.
  24. Tinkers' Construct requires Mantle, you don't have it installed. I'm not sure why FML reached the mod construction phase, it should have stopped loading as soon it saw that a dependency (Mantle) was missing and displayed the missing mods GUI.
  25. WorldRenderer was renamed to VertexBuffer in 1.9 and then to BufferBuilder in 1.12. AxisAlignedBB was moved to the net.minecraft.util.math package in 1.9. BlockPos was moved to the net.minecraft.util.math package in 1.9. MovingObjectPosition and MovingObjectPosition.MovingObjectType were renamed to RayTraceResult and RayTraceResult.Type in 1.9.
×
×
  • Create New...

Important Information

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