Everything posted by Choonster
-
Projectile Rendering Post gone wrong (not really)
Post your latest entity and rendering registration code and FML log using Pastebin/Gist.
-
Blocks that are totally custom. Need to tell if they are a "Block Type"
There's no way to tell if a block is stairs or a sign apart from checking whether it extends BlockStairs or BlockSign . Anything else is just a block that may or may not share some properties of the block type you're checking for, you can't make any assumptions about it. You shouldn't be manipulating metadata directly in 1.8+, set properties of the IBlockState and let the Block worry about metadata. In 1.9+, use IBlockProperties#withRotation or IBlockProperties#withMirror to rotate/mirror a block.
-
[1.7.10]Listening for player teleportation
Try setting a breakpoint and stepping through the method in a debugger. Is the previous tick position accurate after teleporting? Is the current position accurate? Something I just remembered: All subclasses of TickEvent are fired twice per tick of their corresponding system, once with Phase.START and once with Phase.END . Make sure you check the Phase to avoid running your code twice per tick.
-
[1.7.10] How to make a toolmaterial that changes based on what mods are present
This is a basic Java error, you can't have regular statements in the main body of a class. Move the initialisation of all fields to a method (like the init method you already have) and call it in preInit.
-
Projectile Rendering Post gone wrong (not really)
Main.EssenceSplash is the Item argument, so it was null when the constructor was called. Either you're assigning the field a value at some point after the constructor is called or you're never assigning it a value. In future, use [nobbc] [/nobbc] tags when posting code.
-
[1.9.4] ASM how to get a private value from a class
The argument of Field#getFloat (and the other Field#getX methods) is the instance to get the field's value from. In this case, the ItemRenderer instance. Don't pass the Field as an argument. Your current code won't work in the release (obfuscated) environment because there won't a field called equippedProgressMainHand . Instead, it will have an SRG name like field_0013_a (use MCPBot to find the actual name). This means you need to check both names, FML's ReflectionHelper provides some useful methods for this.
-
Projectile Rendering Post gone wrong (not really)
Minecraft is trying to render an ItemStack with a null Item . This is because you passed null as the Item argument of the RenderSnowball constructor.
-
[1.9.4] Creating a custom bow
The issue was that the OP had the wrong method signature (i.e. arguments), not a missing annotation.
-
[1.7.10]Listening for player teleportation
There's no event fired for player teleportation. You could attach an IExtendedEntityProperties implementation (or a Capability in 1.8.9+) to EntityPlayer that stores whether they were in the borders the previous tick. If they were in the borders last tick but they're not this tick, set them to survival mode.
-
Projectile Rendering Post gone wrong (not really)
Every Entity class must have a constructor that takes a single World argument. This is used to create the entity on the client. Side note: Why are you creating classes in the net.minecraft.src package? Use a package unique to your mod, e.g. com.<yourname>.<yourmod> .
-
[1.7.10]Checking if player leaves area
If you look at the implementation of EntityPlayer#setGameType in EntityPlayerMP , you'll see that it calls ItemInWorldManager#setGameType . ItemInWorldManager actually stores the GameType , so get the player's current GameType from their ItemInWorldManager instance.
-
Projectile Rendering Post gone wrong (not really)
That was one of the options I presented, yes. No. Create a class that extends RenderSnowball and has a constructor that takes a single RenderManager argument. Call the super constructor with this argument, the Item to render and the RenderItem instance. Use a method reference to this constructor (i.e. RenderFooBar::new ) as the IRenderFactory implementation. Alternatively, use a lambda as the IRenderFactory implementation. In this lambda, create an instance of RenderSnowball with the appropriate arguments. You could also use an anonymous class instead of a lambda.
-
Projectile Rendering Post gone wrong (not really)
RenderSnowball doesn't have a constructor with a single RenderManager argument, so you can't use RenderSnowball::new as an IRenderFactory . Use a lambda or subclass of RenderSnowball (anonymous or named) instead.
-
[1.9.4] Creating a custom bow
That's not correct. This tutorial explains method overriding and method signatures.
-
[1.9.4] Creating a custom bow
If @Override gives you a compilation error, it's doing its job and telling you that the method doesn't override a super method. The solution is to fix the method signature, not remove the annotation.
-
Minecraft has crashed HELP!!!
config/CustomSpawner/overworld/Environment.cfg has an invalid character on line 1. Either remove the character, restore the file from a backup or delete it and allow it to be recreated.
-
[1.9.4] Creating a custom bow
You didn't override Item#getMaxItemUseDuration . Side note: Always annotate override methods with @Override so you get a compilation error if they don't override a super method.
-
[1.9.4] Creating a custom bow
Override the following methods: Item#onItemRightClick to set the item in use by calling EntityLivingBase#setActiveHand Item#getMaxItemUseDuration to return the maximum use duration of your item Item#getItemUseAction to return EnumAction.BOW so the entity draws the item back like a bow Item#onPlayerStoppedUsing or Item#onItemUseFinish to do something (e.g. spawn a projectile entity) when the entity stops or finishes using item
-
forge instant crashes
Those are both the same crash report. Post the FML log, not a crash report.
-
forge instant crashes
Thaumic Infusion is for 1.8.9. One of your Thaumcraft- or Botania-related mods is for 1.8+. Post the FML log after removing Thaumic Infusion.
-
forge instant crashes
You installed a mod built for 1.8+ on 1.7.10, this doesn't work. If you post the FML log (logs/fml-client-latest.log) instead of the console output, we can tell you which one. Alternatively, look at the mod file names yourself; mods usually have the Minecraft version they were built for in the file name.
-
[1.9.4] [SOLVED Block json's
If the problem is solved, post the solution so others having similar problems can find it in the future.
-
Detecting Nearby Mobs in SMP
The pouch could simply propagate the update to its contents and still have each individual token handle its own effects. This may be slightly cheaper than scanning the player's inventory from PlayerTickEvent .
-
Detecting Nearby Mobs in SMP
If this "token" is your own item, override Item#onUpdate . This is called once every tick while the item is in a player's inventory. Otherwise PlayerTickEvent is the correct event to use. It's fired on both sides and not annotated with @SideOnly , I'm not sure why you thought it was.
-
[SOLVED] [1.9.4] Coloring Block
You need to register them in init rather than preInit.
IPS spam blocked by CleanTalk.