Everything posted by GotoLink
-
Creating an item, that has the function of a shield?
Either use the event as coolboy suggested, there is a tutorial on the wiki, or override Item#onUpdate(ItemStack, World, Entity, int, boolean) in your item. The PotionEffect isn't going to work if you keep it on the client.
-
[1.6.4] Item.registery error (Continued from previous post)
Named registry were introduced in 1.7. 1.6.4 only use numerical id. The preferred method was Configuration#getItem.
-
[1.6.4] Setting Player Inventory Slot Contents on Server Side
You don't need to manipulate the container. Just use the methods in InventoryPlayer.
-
New creative tab for custom spawn eggs?
Extend Item. Item#setCreativeTab(CreativeTabs); Write spawning code inside Item#onItemUse(foo). Eventually use texture from vanilla spawn egg to make it look the same.
-
[1.7.2] Add Recipes to Special Guis!
You might as well tell him to look at minecraft crafting recipe manager. That is the type of code one could use. sequituri was probably talking about your CLASSNAME "example". It doesn't contain any valuable code nor information. That kind of stuff : public class TheUltimateAnswer{ public static Object getSolution(Object allHumankindProblems){ //TODO: Think of something return 42; } }
-
How to set damage to custom sword
See attribute modifiers.
-
Saving information from config file
GameData.itemRegistry.getObjectByName(String)
-
[SOLVED]Custom Bow enchantment system broken!
Bow enchantments look for ItemBow. Extend that class and you should be fine. *Hint* Copy-paste = Baaad . Durability is based on the item damage value.
-
[1.6.4] .getBlockId Help
You are supposed to write code, not expect it from a machine or other program. If you find it too hard, take a break and try something else.
-
[Solved] [1.7.2] Custom Entity does not have Attack Damage attribute
"Available" doesn't mean "used". The wolf damage value is hard-coded in its attack routine. public boolean attackEntityAsMob(Entity par1Entity) { int i = this.isTamed() ? 4 : 2; return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float)i); } See EntityLivingBase#applyEntityAttributes() for the attributes actually registered in all "living" entities. EntityLiving only adds the "follow range" attribute. Only EntityMob and EntityPlayer register the "attack damage" attribute.
-
[1.6.4] .getBlockId Help
....................... Learn how to use "for" loops. Don't follow a "tutorial" that doesn't explain the stuff.
-
[1.7.2] Help with container !
World#getTileEntity(int, int, int) And opening your container from client side (key handler) is not going to work. You need to send a packet to the server and open the container on server side.
-
[Solved] [1.7.2] Custom Entity does not have Attack Damage attribute
And ? The thing about attributes is they are optional. If you want it for your entity, register it into the entity attribute map by overriding the entity attribute initialization.
-
Tile Entity Problems
The burning time needs to be sync on the client to be drawn into the GUI. See ContainerFurnace.
-
[1.7.2] Help with container !
TileEntity is related to a Block in the World. You can't have it in this HashMap from your Main class.
-
[SOLVED] [1.7.2]Forge fails to initialize the game
What is your import for Material ? What is SampleBlock constructor ?
-
[1.7.2] Custom Entity only attack when he sees you.
You also need to remove the ai task when you don't want it to run.
-
[Solved][1.7.2]Game Crash When Adding Items to Player's Inventory
And where jetInhaler is created.
-
Make GuiScreen.buttonList public
He is talking about buttons added to the inventory GUI, with a matching design like the icons for creative inventory. The only thing that Forge could do to ease the process would be to make GuiScreen.buttonList public.
-
[1.7.2] Getting Item Texture/Icon
So the question is when do you call the second constructor for CustomFood.
-
[1.7.2] Missing Dependencies.
You shouldn't run cleanCache unless you switch from versions and want to get some free space.
-
Please help [JavaDoc Problem]
gradlew setupDecompWorkspace --refresh-dependencies
-
RESOLVED [1.7.2] Multiple projects in IntelliJ IDEA
Follow LexManos tutorial till eclipse stuff happens, then import each mod as modules into intelliJ Idea from their build.gradle file. The gradlew idea command is useless, but you can use gradlew genIntelliJRuns to get basic run configurations.
-
EntityListMapping Query
EntityRegistry.registerModEntity appends modid at the beginning of the mob name, you need the complete name to use into the mob spawner logic.
-
[1.7.2][SOLVED] See if player is burning
You are missing @SubscribeEvent, and you better use event.player, rather than Minecraft.thePlayer.
IPS spam blocked by CleanTalk.