Everything posted by larsgerrits
-
Sending packets regularly
Maybe you could make it when the client needs the propertie, the server sends a packet to the client with that propertie, instead of synchronizing the all the time.
-
[1.7.2] Best way to approcah making a power system
Take a look at my source, i created a custom power system: https://github.com/Larsg310/PowerCraft/blob/master/src/main/java/larsg310/mods/powercraft/energy/EnergyNet.java In that class is a utility method for distributing enrgy to surrounding block/cables. It also uses my IEnergy interface that have some methods for connecting and distributing, and my EnergyBar class which actually holds the max power it can hold, the current power it holds and some method for manipulating the energy. P.S. If you see something wrong with my system, please say so so i can make it better.
-
Modded Sword Help (Using Eclipse LUNA)
@knokko, Why do you pass in null in the Magic.get() method? You need to pass in a EntityPlayer object. (Hint: You got that as a parameter in the method)
-
Proper Ray Trace after Block Break
In the BlockEvent (the class that BreakEvent extends) is a EntityPlayer object which you can get the angles from.
-
[1.7.2][unsolved] save mana in world [mana is glitching]
You probably mean the Magic.get method because the class is called Magic...
-
[1.7.2]Problem with Game Registry not "recognizing" getUnlocalizedName()
The best way to find that method, is hitting CTRL+F, type in "tile." and hit search.
-
[1.7.2]Problem with Game Registry not "recognizing" getUnlocalizedName()
There's no method called getBlockName in the Block class. The getUnlocalizedName method is there, but it may not be deobfuscated.
-
[1.7.10] Entity: disabling other AI when using custom AI [Unsolved]
Does anyone know of a mutex bit so that my AI is compatible with swimming, but not with wander?
-
[1.7.2][unsolved] save mana in world [mana is glitching]
A call to .markDirty() makes Minecraft save the WorldSavedData.
-
[1.7.2][UNSOLVED] WorldGen
So how would then that go, X Y Z. isnt "Z" for UP and DOWN ?! da hell, was i looking at google pictures. if(world.getBlock(x, y, z) != Blocks.dirt || world.getBlock(x + 0, y + 0, z + 1) != Blocks.dirt || world.getBlock(x, y + 0, z + 1) != Blocks.dirt|| world.getBlock(x + 0, y, z) != Blocks.dirt) Like this then ?! In Minecraft, the coordinate system is weird. X is for east/west, Y is for up/down and Z is for north/south.
-
[1.7.10]Custom pig throwing errors and not spawning
@proalt That doesn't have anything to do with the error. @F1repl4ce Caused by: java.lang.NullPointerException at f1repl4ce.unlogic.entities.CustomPig.applyEntityAttributes(CustomPig.java:44) Can you post line 44 of CustomPig.java?
-
[1.7.2]Problem with Game Registry not "recognizing" getUnlocalizedName()
getUnloclaizedName You switched 2 characters...
-
[1.7.10] Entity: disabling other AI when using custom AI [Unsolved]
I now about the prioroty system, but that doesn't have anything to do with this. About the mutex bits: How can i make it compatible with swimming, but not with wander? You don't specify it in the list.
-
[1.7.10] Entity: disabling other AI when using custom AI [Unsolved]
My entity extend EntityCreature, and this are the AI tasks: this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(1, new EntityAIRobotBuild(this)); this.tasks.addTask(2, new EntityAIWander(this, 1.0D)); this.tasks.addTask(3, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); this.tasks.addTask(4, new EntityAILookIdle(this)); The thing i want is that when the EntityAIRobotBuild is running, i don't want the EntityAIWander to execute, as that messes up the placement of the blocks. If you want to see more code, like EntityAIRobotBuild, you can use the link in the main post to go to my GitHub.
-
[1.7.10]When Player Steps On Block?
You don't add the World as a parameter... You can get the world by using event.player.worldObj
-
[1.7.10] Entity: disabling other AI when using custom AI [Unsolved]
Hello, I added a new entity with some custom ai, and that works. But when my entity is using my custom ai, it is still going to walk away and screw up my custom AI. Does anyone know how to fix that? My code is here. If anyone needs more info, please ask, I'll be happy to provide that.
-
[1.7.2] leaf colorization
You need to override the method public int getBlockColor() and public int getRenderColor(int) to return 16777215, so it won't get colored, but use your texture. (Don't ask me how you get this number, found it in Block.getBlockColor())
-
FMLCommonHandler.instance().bus() vs MinecraftForge.EVENT_BUS
FMLCommonHandler.instance().bus() is used for FML events, and MinecraftForge.EVENT_BUS for Forge events.
-
[1.7.2] leaf colorization
Code would be usefull....
-
Crafting Table GUI immediately closes on open
I'll give up. I guess you don't want to follow the official Java Conventions...
-
Crafting Table GUI immediately closes on open
About 2: Here's a quoute from Wikipedia: So why areyou saying that isn't CamelCased? That is defenitly CamelCased. Please use those conventions!
-
[1.7.10][Solved] Item modifies terrain, but blocks keep changing back
You are doing things client side, do those server side. Hint: Use world.isRemote , that will return true if it's client and false if it's server.
-
Water Block wont spread
WTF Does this code mean: Block.getBlockById(Block.getIdFromBlock(this) You are basicly getting a block from a id which you get from a block. You could've just used this instead of that chain of code....
-
[1.7.10] [SOLVED] wierd player damage event error (it makes no sense to me)
You need to have the LivingHurtEvent as the parameter, not as the method name.
-
[1.7.2/1.7.10] Make mod compatible with BuildCraft MJ
Use Buildcrafts API.
IPS spam blocked by CleanTalk.