Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/18/17 in all areas

  1. I'm trying to revive this mod (Doggy Talents) that the author created about a year ago since everyone (including myself) has enjoyed it. The mod only got to 1.8.4 but stopped at that version, the author hasn't been on since. Since 1.8, many, many things in Minecraft as far as coding has changed (in addition to the fact that I haven't modded in nearly 3 years now), it's becoming a pain in the butt. So far I have gotten a good bit of the changes converted over becaused I compared the code with my previous works (Zero Quest, TetraCraft, and Cryogenic Library) however, there are still many problems I am encountering because of the major changes. I've complied up a list of current issues I'm having with updating the code, which is the following: Can't find an alternative method for StatCollector, which Doggy Talents utilizes for collecting and translating string components to text Adding Tile Entities to Blocks and the methods inside Tile Entities Adding custom block boundaries Getting the entity (i.e player) that is riding on another (i.e. horse) or entity (i.e. horse) that is being ridden on There might be more I'm missing, but I spot more I'll add onto this list. Also, here is the source code to the forked repository
    1 point
  2. Well it's a bit hard to help "just like that", all I can recommend you is to watch CPW's video ( https://www.youtube.com/watch?v=yanCpy8p2ZE ) if it's not already done. There is already a PR to extend substitution, but it's for 1.10 so this one will not be accepted. You can find it here : https://github.com/MinecraftForge/MinecraftForge/pull/3462 Maybe there could also be a method in IForgeRegistry<T>, that would feel consistent with the new register events introduced in 1.11. But all of this is a bit useless if that bloody bug is left unfixed ><".
    1 point
  3. 1 point
  4. PlayerCloneEvent is fired when a copy of a player is created before they respawn. Use this to copy data from the old player to the new one.
    1 point
  5. Got it! I think you'll need to give the player a capability to keep track of the property. (The forge docs has information about capabilities if you're not familiar with the system). Then, when your custom block is placed, you check the player's capability and define the behaviour depending on the property. If your blocks are placed with ordinary ItemBlocks, then you can override Block#getStateForPlacement and it will be handled by vanilla ItemBlock behaviour. If it's a custom item then you'll probably need to override Item#onItemUse to manually place the block with the appropriate state.
    1 point
  6. It was renamed to net.minecraft.util.text.translation.I18n and deprecated, because the server shouldn't be translating things (the dedicated server can only translate to en_US). Use net.minecraft.client.resources.I18n from the client instead (or send a TextComponentTranslation, which will translate to the client's locale). This hasn't changed. Override Block#hasTileEntity(IBlockState) to return true for any state that has a TileEntity and override Block#createTileEntity to create an return an instance of the TileEntity for the provided state. Which methods do you want to know about? Try looking at the TileEntity class or vanilla extensions of it. MCPBot can tell you the SRG name of a field/method in a specific version and also tell you the current MCP name of an SRG name. This issue tracker documents most renamed field/methods. Again, look at vanilla examples like BlockCactus or BlockBasePressurePlate. Store the block's bounding boxes as AABB fields. Override Block#getBoundingBox to return your Block's main bounding box, Block#getCollisionBoundingBox to return your Block's collision bounding box (if it's different to the main bounding box) and Block#getSelectedBoundingBox to return your Block's selection bounding box offset by the BlockPos (if it's different to the main bounding box). If your Block has multiple collision bounding boxes, override Block#addCollisionBoxToList (the instance method) to call Block.addCollisionBoxToList (the static method) for each bounding box. Entity#getRidingEntity returns the entity being ridden by this. Entity#getPassengers returns the entities riding this.
    1 point
×
×
  • Create New...

Important Information

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