Everything posted by Draco18s
-
[1.8] Making a portal that teleports players AND non-player entities
You don't put any kind of cooldown on transferring non-player entities.
-
[1.7.10] How to check if a tool can harvest a block?
getHarvestTool takes an integer and returns a string. getHarvestLevel takes an integer and returns an integer. isToolEffective takes a string and an integer and returns a boolean. I fail to see how your NBT item is relevant.
-
[1.7.10] [Solved] Tile entity with .obj model follows mouse.
I've also had similar problems using only one matrix push/pop. Add a second one between the translate and the rotate.
-
[1.7.10] How to check if a tool can harvest a block?
Block#getHarvestTool(), Block#getHarvestLevel(), Block#isToolEffective()?
-
[1.7.10] Testing mod in Eclipse on Server - Crash from my network registry
Try putting the registration of the event handler in your client proxy?
-
[1.7.10] Testing mod in Eclipse on Server - Crash from my network registry
Its funny what reading does. [14:07:11] [server thread/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
-
[1.7.10] Testing mod in Eclipse on Server - Crash from my network registry
return handleClientMessage(Minecraft.getMinecraft().thePlayer, message, ctx); Oh jesus christ. The server still has to LOAD the code for this class and make sure it's valid. It can't do that if you include a reference to a client sided object.
-
[1.7.10] Testing mod in Eclipse on Server - Crash from my network registry
Anything inside a package called "client" is for the client only and is marked @SideOnly(Side.CLIENT)
-
[1.7.10] Testing mod in Eclipse on Server - Crash from my network registry
Client code present on dedicated server. Fix yo shit.
-
[1.7.10] [Solved] Custom Events?
Event ev = new MyCustomEvent(); theEventBus.post(ev); Where theEventBus is a reference to an event bus (as there are several), eg. MinecraftForge.EVENT_BUS.post(ev), and you can even write your own if you feel the need, it's basically just a priority-sorted list of the listener functions which are called in order when post() is executed.
-
[1.7.10] [Solved] How do I get nbt data from a TileEntity?
The emphasis here is that you implement writeNBT and readNBT, you don't call them (the only common exception being getDescriptionPacket and onDataPacket, as that's a form of save/load except that it's the sync between server and client rather than to disk*). *IMO the override implementation used is something that should have been in the base TileEntity class, but which isn't because very few of the Vanilla TEs use it as they have special packets that sync their data, rather than the generic packet used for mod TEs.
-
[1.7.10] [Solved] Custom Events?
You extend Event and post it to the bus. Which bus is up to you, but at least pick one that makes sense. Don't put an update event on the ore gen bus, for example.
-
[1.7.10] local entity coordinates to global coordinates
sin(10) = 0.174 sin(-10) = -0.174 You can't just arbitrarily modify the rotation value. If you absolutely must use a positive value, add 360 (in degrees, or 2*PI in radians).
-
[1.7.10] [Solved] How do I get nbt data from a TileEntity?
Unless you are doing Dirty Things and know what you're trying to do. E.g. configure an entity that is placed as part of structure generation, and the values you want to set aren't public (for example, making a spawner spawn a custom mob on a much longer than default timer or place a specific painting). NBT can give you access to values that aren't, and shouldn't be, public but sometimes you have to go "I need this to be like this for a good reason." (Note: if either of those two examples can be done without modifying the NBT, using reflection, or ASM, I'd be happy to update the code).
-
[1.7.10] local entity coordinates to global coordinates
http://lmgtfy.com/?q=local+to+global+coordinate+transformation Long story short: it involves a lot of math, and its a lot of math that has existing packages to help you with. But doing it by hand is quite possible and really not that hard, as long as you understand how to multiply matricies (the MSDN link is probably the most useful).
-
[1.8] [Solved] Adding custom Mob to the entities a Zombie will attack
The only thing to be aware of is that the EntityConstructed event fires before those fields are initialized.
-
[1.7.10] set an ItemStack to dead
And what magical itemstack is this?
-
[1.7.10] set an ItemStack to dead
Really?
-
[1.7.10] set an ItemStack to dead
Jesus.
-
[1.7.10] set an ItemStack to dead
You don't. Can't. You get it from the event object, like your already doing.
-
[1.7.10] set an ItemStack to dead
Then you need to set the event to canceled and set the EntityItem to dead. OR Remove the item from the player's inventory. Nulling the local variable doesn't do anything, you need to null the inventory's reference to it.
-
[1.7.10] Gradle packaging dependencies into mod jar.
Honestly, no idea. I managed to get that, due to having multiple jar files I wish to publish (so I have a task for each one). Not sure why you're getting what you're getting with the regular build, and I don't know enough about the build scripts to know how to tweak the default task.
-
[1.8]Rendering Custom Potion Icon
Well, the "width" and "height" there aren't "size on screen" they're "width and height of the texture region." And right now your code says "use as many texture pixels as the game window is large."
-
[1.7.10] Gradle packaging dependencies into mod jar.
Apologies, for some reason I missed the scroll bar before. I remember even checking twice to see if there was more (as I was seeing only the one section). Hmm. Ok then. Try adding this: task exclusionBuild(type: Jar) { baseName = archivesBaseName+"_noAPIs" from zipTree(jar.outputs.getFiles().getSingleFile()).matching { exclude 'mcmod.info','enviromine/**','cofh/**' } } exclusionBuild.dependsOn('reobf') Then, instead of "gradlew build" do "gradlew build exclusionBuild" (You can name the task whatever you'd like, of course).
-
[1.8]Rendering Custom Potion Icon
Might help if you bound the texture before drawing it to the screen.
IPS spam blocked by CleanTalk.