Everything posted by GotoLink
-
[Solved] Trouble using RenderBlocks and a TileEntitySpecialRenderer
renderBlocks.renderBlockByRenderType(block, te.xCoord, te.yCoord, te.zCoord); This is the problem. Check what this method does.
-
Recompile errors after fresh forge installation [SOLVED] [1.6.2]
That is probably a left over from mcp default, I get it too. Install.bat. Make mod. Recompile.bat. Reobfuscate.bat. Get mod in reobf folder.
-
The Datawatcher
Personally I would replace the Exception thrown by an hook to another class.
-
Faster Drawback on my bow
Look at the ItemBow class ?
-
[Solved] Trouble using RenderBlocks and a TileEntitySpecialRenderer
You should have a render type of -1 to use TESR.
-
Custom Enchantment adding effect when attacking an Entity
public float calcModifierLiving(int par1, EntityLivingBase par2EntityLivingBase) { return EnumCreatureHelper.getSoulCreatureAttribute() == EnumSoulCreatureAttribute.FROST ? (float)par1 * 2.5F : (float)par1 * 0.0F; } How does getter work without any argument ? Do you setSoulCreatureAttribute() somewhere ? Be sure not to cancel the event.You don't need a super.x(). This is it. The enchantment you will check by reading the NBTTag from the ItemStack of player.getHeldItem().
-
Recompile errors after fresh forge installation [SOLVED] [1.6.2]
I run install.bat, after that i run decompile I personally never run the decompile script when modding with Forge. Install is already doing it.
-
How to spawn a mob similar to the Iron Golem?
Use PlayerInteractEvent to catch the right click action. Check if player has a block in hand which is a pumpkin...
-
findContainerFor() returns null for core mods
Let me think... FML itself is a coremod and deals with the loading order of other coremods and mods... I see three solutions to your problem (which actually is to not being able to register things through Forge methods): -make a coremod part and a mod part -load your own mod section in your coremod like FML does -don't use Forge methods, make your own
-
getDisplayName() always return english name?
item.getUnlocalizedName2() will give you the name the item is built with.
-
Questions About Death Causes
There is a CombatTracker field (obfuscated) in EntityLivingBase. I think it keeps a list of latest damage done, with player names and such.
-
Trouble rendering mobs
@Override protected ResourceLocation func_110775_a(Entity entity) { return null; } I'd bet your mob has no texture. public void AddRenderer(Map map){ } { Ha, ModLoader code. Does it work ?
-
Village Event
IVillageCreationHandler ? Not sure that is what you need though.
-
Client Shutdown Event
Hi BuildLight First question: I don't know whether it exists or not. (FMLServerStoppingEvent probably isn't what you look for) Second question: No, you can't tell, but for each object, the garbage collector calls finalize() during the process, so you can add things in it that you want to be done at that point (don't forget to call super.finalize() at the end then)
-
Recompile errors after fresh forge installation [SOLVED] [1.6.2]
Would you please describe exactly how is your dev setup, and what you do to recompile ?
-
Custom Enchantment adding effect when attacking an Entity
Yes, you got it right. Wait, so, do you have this effect or not ? I thought you wanted something to do the effect.
-
findContainerFor() returns null for core mods
I think, sending a pull request on github repository.
-
Custom Enchantment adding effect when attacking an Entity
You can search for MinecraftForge.EventBus.post(new LivingAttackEvent(args)) or similar. this is where the event is triggered. If you use PreInit, Init methods and such in your main mod class, you already know how to make a method that can receive an event. The only difference is the event argument, and the @ForgeSubscribe annotation instead of @EventHandler. Just place this method in a class (you can put in your main class at first) then register with MinecraftForge.EventBus.register(class); (you register the entire class, so you can put multiple events in one) You should already have methods ready to read and write an ItemStack NBTTag to get/set your enchantment by the way.
-
Custom Sounds Not Working
Yes, only "sound" will work in your case.
-
Handling player logoffs?
Implementing IConnectionHandler.
-
Help Editing Vanilla Blocks and Items
When the player right click a furnace block, close furnace Gui, open your own.
-
[Unsolved] Connected textures derping [1.6.2]
If you think your way is better, why is it not working ?
-
[SOLVED]Custom TickHandler counting milliseconds
Just do like you did with comboStreak.
-
Help Editing Vanilla Blocks and Items
You are not "2. Modifying vanilla stuff". You are removing them, since they are hardcoded in vanilla but you want to make it your own code. Unless you know the entire Minecraft code (and most of Forge too) you shouldn't do that. You wouldn't know the consequences of such a modification. Coding wise, it is stupid to change/remove things when they don't belong to you. (I am aware reflection exists, but its primary goal isn't to remove private things) Would you remove part of Forge if you didn't like them ?
-
[SOLVED]Custom TickHandler counting milliseconds
First: @SideOnly(Side.CLIENT) Don't write it if you don't know what it means. Seriously. Don't. Now, in onUpdate, you can use world time as a counter or just increment your own counter field. If you want to use a TickHandler, you'll have to make a class with "implements ITickHandler". There are tutorials on it.
IPS spam blocked by CleanTalk.