Everything posted by GotoLink
-
[1.5.2] Transparency in GUI [SOLVED]
The problem is you are using the event wrong. RenderGameOverlayEvent is a parent event, with a *-load of children. You need to specify at which step of the event you do the rendering (Pre, or Post ?), and which child event (ElementType) to use. Without that, you are doing the rendering multiple times in the same rendering cycle. Which basically mean you are rendering your own gui on top of itself.
-
Rendering help
Did you register the spear entity ? EntityRegistry.registerModEntity(EntitySpear.class, ...);
-
How to know if a block is natural generated or not
It does happen. Of course, we are talking about breaking time of a block, which no player can actually measure precisely. But consider this issue is more general than the block hardness only, all Block data (except stored in a TileEntity) is subject to this effect, thus your idea is really flawed. Don't be worried though, Forge provides hooks to effectively achieve what you want. (BreakSpeedEvent, in this case) I think the original topic is done anyway. Answers have been given, and the OP issue with xray should be discussed elsewhere too.
-
[1.6.4] How to make "meta items" based on NBT Tags.
Override methods in Item which have ItemStack as argument. Add different behaviour according to that ItemStack NBTTagCompound. Example: @Override public int getMaxDamage(ItemStack stack) { if(stack.hasTagCompound() && stack.stackTagCompound.hasKey("SubType")){ return new ItemBehavior(stack.getKey("SubType")).getMaxDamage(); } else return super.getMaxDamage(stack); }
-
Item needs to take damage when used in crafting
Note that while getContainerItemStack(ItemStack) is easier to use, it will do the same thing for every recipe containing your item.
-
Item needs to take damage when used in crafting
Make a ICraftingHandler. In onCrafting(args) check the crafting space (IInventory) for your items, and the ItemStack for your diamond dust. Then use something like if (!player.inventory.addItemStackToInventory(stack))//try to put into the player inventory, if full... player.dropPlayerItem(stack);//drop the item to give the player (EntityPlayer) another item.
-
A couple custom dimension questions
BiomeManager#addVillageBiome(BiomeGenBase) typically does that for you. I really recommend the use of events. There are really simple event tutorials on the wiki, like the Bonemeal, or the SoundLoad one, which can get you started.
-
A couple custom dimension questions
You can use the BiomeEvent.GetVillageBlockID event to change block according to the biome the village structure is generated in. The default village generator (MapGenVillage) is used in ChunkProviderGenerate. You can use this chunk provider as a base for your own, or use the InitMapGenEvent.
-
Ghost entity, duplicated entity!?!?
Fixed that for you @polkzminer I'd recommend you the useful "for(variables_init, conditions, loop_increment)" keyword.
-
How to know if a block is natural generated or not
That would only work with one player. And I doubt you have one alone player on your server. I'd suggest you study them thoroughly, checking code and such. There may be more simple and obvious ways than making a mod with incompatibilities and such.
-
How to know if a block is natural generated or not
You couldn't simply give a new block the stone texture in your code ? Wouldn't that be enough against xray ?
-
Jerky Block Model Animation
Maybe I am blind, but I don't see any code.
-
Output in chat and check for key pressed?
You need a KeyHandler class for that. You can send a chat message to the player with EntityPlayer#sendChatMessage(ChatMessageComponent)
-
How to use materials in Tools?
...The ItemTool constructor expects it.
-
How to know if a block is natural generated or not
I don't see how you can do it without actually saving the entire world a second time, at worst. Why do you want to know ? Maybe you don't need to do any of this at all.
-
How to use materials in Tools?
Use EnumHelper#addToolMaterial(...) This will return you the material to use for your items.
-
Item tooltip hook
Use a newer version of Forge, it will be in the event package.
-
[SOLVED] New type of crop [SOLUTION INSIDE]
Seems you can't use the melon stem renderer without extending BlockStem. You can do that, or set your own block renderer, there is a generic tutorial for that on the wiki.
-
[SOLVED]Custom mob increased maximum movement speed?
protected boolean isAIEnabled() { return false; } Did you change this in your entity, or does any of your parent classes override this ? Or this ? public float getAIMoveSpeed() { return this.isAIEnabled() ? this.landMovementFactor : 0.1F; }
-
[SOLVED] New type of crop [SOLUTION INSIDE]
Well you can extend BlockCrops and use the melon stalk renderer with getRenderType(){return wtv-id-melon-type-is}.
-
[SOLVED]Custom mob increased maximum movement speed?
How did you define this ? attackingSpeedBoostModifier Maybe your boost is not applied or too much for Minecraft limits. Also, what parameters did you use when registering your mob ?
-
[SOLVED]Custom mob increased maximum movement speed?
applyEntityAttributes() This is where the base attributes are set.
-
Tying a Dimension to an Item
There is an event for that. ItemDestroyedByPlayerEvent or something.
-
Config Code Is Crashing Minecraft 1.6.4
Are you doing anything to the player ? It looks like it tried to expand its bounding box forever...
-
Gui not opening!? NEED HELP
Obviously, you are not a NetworkMod. Add @NetworkMod.
IPS spam blocked by CleanTalk.