-
Posts
1689 -
Joined
-
Last visited
-
Days Won
1
Everything posted by SanAndreaP
-
for(EntityItem droppedStack : event.drops) { if(droppedStack.getEntityItem().getItem() == MultiverseItems.SavingStone) { event.drops.remove(droppedStack); saveItems = true; } } You cannot do remove() directly on a list while you're iterating through it. You need to use an iterator and use that to remove the element: http://stackoverflow.com/a/223929
-
Instead of annotating it with @Subscribe , use @EventHandler . Whoops, I just confused that with my coremod :I Yeah, but CommandBase has most methods already implemented, so you don't need to do the logic for them for yourself.
-
[1.8.0] FML 8.0.7.1014 Crash when entering a world
SanAndreaP replied to Eractnod's topic in Support & Bug Reports
Read the EAQ -
Code?
-
Most 1.7.2 mods work with 1.7.10. If not, you should bug the mod author about it. And in which ways is 1.7.2 superior to 1.7.10? If it has anything it's more bugs...
-
[1.7.10] LivingDeathEvent is fired either twice or not at all
SanAndreaP replied to DaBananaboat's topic in Modder Support
You need to have the event only on the clientside? If yes, then you have to use packets, since the event is fired serverside only. Why it's fired twice? I don't know. Why do you need to have it on the clientside anyway? -
Make a new class extending CommandBase and look into the different command classes on how to properly set it up. To register your command class, in your main class, add a new handler method which has FMLServerStartingEvent as parameter (don't forget to annotate it with @Subscribe @EventHandler ). Within said method, register your command class by calling eventParam.registerServerCommand(new MyCustomCommand());
-
Why do you need 1.7.2 so badly? If 1.7.10 works, then use it, it's the most recent 1.7 MC anyway.
-
yes https://github.com/SanAndreasP/BananaDungeons/blob/master/java/de/sanandrew/mods/bananadungeons/util/BananaDungeons.java#L17
-
Minecraft Forge 1.7.10 Starting Integrated served
SanAndreaP replied to torres13xD's topic in Support & Bug Reports
Add -Djava.net.preferIPv4Stack=true to your VM args and try again Next time, read the EAQ before posting. -
Do as it says, run with --stacktrace option and give us the output. Recommended is to give us the content of the .gradle/gradle.log
-
You mean having your icon in your block class? Make an IIcon field, use the registerBlockIcons method to instanciate it and use that field as the IIcon parameter in your particle.
-
- What is the point of that? - mods can either override the current MainMenu or add to it already. The Aether devs had an API where mods can register their own MainMenu and you could choose which MainMenu you want (It's not updated, AFAIK) - Isn't there a vanilla helper class for this already (ItemRenderer)? - would require too much work and recoding. - The current "Container API" is fine as it is. Also, except "copying some methods", what would be another benefit to your suggested API? - Why do you need this? - How about canPlaceBlockAt , canPlaceBlockOn etc.? Also how about BlockRotatedPillar ? - You should not prevent functionality of a workspace if there's an update. What if the update had an error? Suddenly nobody could mod anymore. Also there's also a pretty easy way to update your workspace: change the forge version in your build.gradle, run gradlew setupDecompWorkspace - Why? Also you would have to recode most of the stuff because of method clashes etc. - You can have your own AT in your normal mod now if you want/have to. Access levels are there for a reason.
-
It checks if the stored energy of your TE is not 0. If it's true, then it will go to each side of your block ( for loop), grabbing the TileEntity from the block of the current side (if it has one, else it'll be null ) and checks if the TileEntity is an instance of IEnergyHandler (you can omit the null-check, it's automatically done by the instanceof keyword). If that is true, it will extract energy from your TE and insert that into the other TE.
-
You first rotate, then translate. Do it the other way around. Also those are not needed: GL11.glTranslated(-x, -y, -z); GL11.glRotated(-rotation, 0D, 1.0D, 0D); Instead surround your render code with GL11.glPushMatrix() (saves the current matrix state) and GL11.glPopMatrix() (restores the previous matrix state, reverting your translation/rotation like you did with your 2 calls).
-
You can do it the way you described. I used an event (TextureStitchEvent.Pre) for registering my icons, because they neither correspond to an item nor a block: https://github.com/SanAndreasP/ClaySoldiersMod/blob/master/java/de/sanandrew/mods/claysoldiers/client/util/Textures.java event.map.getTextureType returns 0 if it's currently stitching the blocks texture together, 1 if it's the items texture.
-
Minecraft 1.7.2 forge not opening up?
SanAndreaP replied to theminecraftaddict555's topic in Support & Bug Reports
Read the EAQ -
Also use the IExtendedEntityProperties to save your value instead of trying to inject your data into the players NBT. Here's a good tutorial on how to do it: http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571567-1-7-2-1-6-4-eventhandler-and?comment=2
-
In your mod class, @Subscribe to the FMLServerStartedEvent and call following within it: MinecraftServer.getServer().worldServerForDimension(0).getGameRules().addGameRule("theNameForYourGameRule", "aBooleanValueAsString") The "aBooleanValueAsString" can be either "true" or "false" .
- 1 reply
-
- 1
-
[1.7.10] [Forge] [SOLVED] Entity won't make grass steps
SanAndreaP replied to NovaViper's topic in Modder Support
-
[1.7.10] [UNSOLVED] updateTick() on a crop not working
SanAndreaP replied to Raizunne's topic in Modder Support
Try to use onItemRightClick() instead of onUsingTick() -
[1.7.10] [Forge] [SOLVED] Entity won't make grass steps
SanAndreaP replied to NovaViper's topic in Modder Support
Set a breakpoint in your if condition and see if it even gets called. If it does, inspect what each method returns. -
forge fake player problem [Partially Solved]
SanAndreaP replied to brandon3055's topic in Modder Support
Probably? I never worked with the FakePlayer stuff before, but sounds like it. Another note, you can shorten your attackEntityFrom() call by replacing MinecraftServer.getServer().worldServerForDimension(((EntityLiving) mob).dimension) with (WorldServer) mob.worldObj -
Use 1.7.10. 1.6.4 is not supported anymore.
-
[1.7.10] Won't read mods (Mods do not work!)
SanAndreaP replied to JamesMCF's topic in Support & Bug Reports
Seems like you just installed ForgeModLoader FML{7.10.86.1007} [Forge Mod Loader] (fml-1.7.10-7.10.86.1007.jar) Unloaded->Constructed Get the full Forge installer from files.minecraftforge.net