Jump to content

herbix

Forge Modder
  • Posts

    116
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Personal Text
    "erbi" means fool!

Recent Profile Visitors

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

herbix's Achievements

Creeper Killer

Creeper Killer (4/8)

27

Reputation

  1. Thanks TGG, but How can I find all "sword" models and replace them with my own?
  2. Hi, My question is simple: Can I or how to render an item with some coverage based on NBT tag of the item? For example, I have a diamond sword and now it's rendered as it is. When I changed some of its NBT tags, I need it rendered differently. Say, a diamond sword with blood. Modifying one item may not difficult, but what should I do if I want all sword items have this feature (maybe include swords of other mods)?
  3. As I searched ChunkProviderGenerate#provideChunk, ChunkProviderEvent.ReplaceBiomeBlocks event could get the ChunkPrimer during terrain generation.
  4. Hi Samueru, If you are to generate terrain once the chunk created, you could generate it in ChunkProvider#provideChunk. Usually a ChunkPrimer is created in it in order to set all blockstates in the chunk. Set a blockstate in ChunkPrimer is much more efficient than World#setBlockState, and vanilla cave generation is implemented in this way.
  5. Sure. These code works on client side. When rendering other players, they are looked from your eyes. That means they are always in third view. If not check unique ID, other players' item are rendered as first view when you are in first view.
  6. I don't understand why you read property ICE and then write it back. Also, you didn't implement getMetaFromState and getStateFromMeta well. Since you don't have a getStateFromMeta, the state will always be the default state. And... using getActualState means some states are calculated not stored in meta. For example, the direction of redstone wire. If your block states cannot be calculated, I suppose tile entity is a better choice.
  7. I did it in my item class, override getModel method: @Override @SideOnly(Side.CLIENT) public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining) { Minecraft mc = Minecraft.getMinecraft(); boolean isFirstPersonView = mc.thePlayer.getUniqueID().equals(player.getUniqueID()) && mc.gameSettings.thirdPersonView == 0; if(isFirstPersonView) { return /* some resource */ } else { return /* some other resource */ } }
  8. Thanks. I found out that since it's a weak map, its values can be released by gc mechanism.
  9. I read codes of DimensionManager and find a field weakWorldMap . It's a weak map and when setWorld a world object is put in and they are never removed. I doubt whether this would cause memory leak after several loading and unloading operations, since weak maps determine equality by == not .equals . And want to know what the field used for. That's my question. Any reply would help. Thank you.
  10. I suddenly found out that I uses net.minecraftforge.fml.client.config.GuiSlider not the vanilla one.
  11. Override canUseCommand or something similar. PS: Whether a player can use a command depends on "cheat enabled" not "creative mode".
  12. You can get the player by event.player , and the world event.player.worldObj . There're methods and fields related to player list in worldObj . And there're methods in Entity class to calculate distance. Players are also entities. PS: There're lots of changes from MCP to Forge. Reading Forge source codes helps more.
  13. Try events. There's a cancelable event ServerChatEvent .
  14. Server resource packs would help.
  15. Also, minecraft 1.8 uses World#addWeatherEffect not World#spawnEntityInWorld to spawn a lightning bolt. CommandSummon gives an example of how to summon lightnings.
×
×
  • Create New...

Important Information

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