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 (4/8)
27
Reputation
-
Thanks TGG, but How can I find all "sword" models and replace them with my own?
-
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)?
-
[Solved] [1.8] Most Efficient Way to Generate a Pre-made Custom Structure?
herbix replied to サムエル's topic in Modder Support
As I searched ChunkProviderGenerate#provideChunk, ChunkProviderEvent.ReplaceBiomeBlocks event could get the ChunkPrimer during terrain generation. -
[Solved] [1.8] Most Efficient Way to Generate a Pre-made Custom Structure?
herbix replied to サムエル's topic in Modder Support
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. -
[SOLVED] [1.8] Returning .JSON Model In Third Person
herbix replied to EverythingGames's topic in Modder Support
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. -
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.
-
[SOLVED] [1.8] Returning .JSON Model In Third Person
herbix replied to EverythingGames's topic in Modder Support
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 */ } } -
[Solved] Question about "DimensionManager.weakWorldMap"
herbix replied to herbix's topic in Modder Support
Thanks. I found out that since it's a weak map, its values can be released by gc mechanism. -
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.
-
I suddenly found out that I uses net.minecraftforge.fml.client.config.GuiSlider not the vanilla one.
-
Override canUseCommand or something similar. PS: Whether a player can use a command depends on "cheat enabled" not "creative mode".
-
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.
-
Try events. There's a cancelable event ServerChatEvent .
-
[1.8]Modify item model + texture, as well as entity texture
herbix replied to Miclebrick's topic in Modder Support
Server resource packs would help. -
Also, minecraft 1.8 uses World#addWeatherEffect not World#spawnEntityInWorld to spawn a lightning bolt. CommandSummon gives an example of how to summon lightnings.