Everything posted by Ernio
-
[1.9.4]Crash in minecraft server
Usually I am not rude (I am still not, as of now), but what if I told you that I am writing 3rd post in this thread with SAME content. What do you not understand? Google on how to make proxy, post code, we will fix it if needed.
-
[1.7.10] How to set item/block texture using part of huge united texture
If this is the only excuse then you have no reason to write code (which would take more than necessary) to do such thing. Go to gimp/whatever and start cutting your sheet in pieces and make PROPER resources (whic json and all). Seriosuly, you will have more problems now and in future (aswell as other ppl like texturers) by trying to redesign systems.
-
[1.7.10] How to set item/block texture using part of huge united texture
If this is the only excuse then you have no reason to write code (which would take more than necessary) to do such thing. Go to gimp/whatever and start cutting your sheet in pieces and make PROPER resources (whic json and all). Seriosuly, you will have more problems now and in future (aswell as other ppl like texturers) by trying to redesign systems.
-
I need move entity by use ArrayList int.
PositionX.add(i, x); PositionX.add(i, z); You messed up X with Z.
-
I need move entity by use ArrayList int.
PositionX.add(i, x); PositionX.add(i, z); You messed up X with Z.
-
[1.9.4]Crash in minecraft server
SideOnly means the class/method/field is NOT present (not loaded by VM) on other side than one typed. You NEED to use proxies if you want to make references to such SideOnly things.
-
[1.9.4]Crash in minecraft server
SideOnly means the class/method/field is NOT present (not loaded by VM) on other side than one typed. You NEED to use proxies if you want to make references to such SideOnly things.
-
Run code when player changes selected item
Then PlayerTickEvent and iteration.
-
Run code when player changes selected item
Then PlayerTickEvent and iteration.
-
Run code when player changes selected item
onUpdate() is called whenever item is in inventory. Do that there. Are you also asking about removing item from world/other inventories (like mobs or chests)?
-
Run code when player changes selected item
onUpdate() is called whenever item is in inventory. Do that there. Are you also asking about removing item from world/other inventories (like mobs or chests)?
-
[1.9.4]Crash in minecraft server
http://mcforge.readthedocs.org/en/latest/concepts/sides/ Read up and understand. Setup Proxies. Whenever you reference class/method/field maked with @SideOnly - you will call it by proxy. (e.g common proxy method will be empty, and client proxy method will have call to Minecraft class, or Particle or whatever).
-
[1.7.10] How to set item/block texture using part of huge united texture
I will start with saying this - when minecraft setups textures it stitches them together into one big texture sheet. What you basically want to do is take your own sheet, split in in parts and pass them to MC to stitch them again. Sorry, but I am somehow missing your ideals here. Take your sheet to GIMP and export normal 16x16 (or whatever other size) small .png which then you will assign to items/blocks using json files. Otherwise - explain what's the point of having big texture sheet?
-
[1.7.10] Saving data to a file?
Simply save it to file using standard IO operations. If you want to utilize NBT use CompressedStreamTools. Coords can be saved server-wise (not per-world) in some static class/map/list.
-
[1.8] Custom mob drop with specific tools
The boldness of d7 is some next level shit! But seriously - after yaers of codding/modding (I started second quick after 1st) I can say that tutorials and copy-pastes will not teach you shit! Learn to read callbacks and search methods - just because people don't make tutorials on some stuff, doesn't mean it's not possible - you can practically extend any class there is and override whatever you want and then apply it to game. Don't limit yourself with tutorials, do your research on source. I'd also recommend open source mods of good quality.
-
ItemState added, TileEntities removed?
1. I don't see a reason for this. Blocks in world are not represented by separate objects but as arrays of bits. Making each have possibility of holding data is just bad computation vise. This is precisely why block can have TileEntity - to get that possibility of having additional data. 2. We alredy have that. Forge 1.8.9+ Provides @Capability system that like old IEEP to Entities, allows assigning data-object to ItemStack which is loaded with stack and saved when stack is saved. Said that - I am interesed about what Lex said about vanilla item props - did you guys (forge devs) literally raced vanilla devs and made your own system? Should we expect changes on that field in future?
-
[1.7.10] Adding Dependencies via @Mod annotaion
If the library you are adding is a mod, it cannot be in /mods/. Doing so will cause it to be loaded by both eclipse (as library) and forge itself (as mod). Have it elsewhere. As to other "required things" - remember to have deobfuscated jar and attach source.
-
1.7 Animated fluid in gui? UNSOLVED
http://www.minecraftforge.net/forum/index.php/topic,38758.msg203882.html#msg203882 That linked, you probably want 1st option (.pngs) You can use vanilla water images to animate.
-
[1.9]Gui incompatibilities
PlayerLoggedInEvent is server only event. Minecraft.class is client only class. http://mcforge.readthedocs.io/en/latest/concepts/sides/ You should NOT replace GuiIngame. Use RenderGameOverlayEvent.Pre - to cancel rendering of whatever you want. Post - to render your stuff. Use ElementType to pick rendering phase (otherwise you render multiple times).
-
[1.7.10] Adding Dependencies via @Mod annotaion
"required-after:ModID@[1.0,);required-after:ModID2@[1.0];required-after:ModID3" Which translates to require ModID with version 1.0 or higher, ModID2 with version 1.0, ModID3 of any version. http://mcforge.readthedocs.io/en/latest/conventions/versioning/
-
[1.9] Custom models not texturing properly?
There was something similar recently: http://www.minecraftforge.net/forum/index.php/topic,38949.0.html Might be worth looking into. Totally wild guess as you don't say much (there is nothing to say really). P.S: If this is your model - absolutely fkn awesome, if not - still awesome (where can I find it? Or can you share it?)
-
[1.8.9] Drop Handler
Do you even probability? You either have 10% (1/10 of drops will be soul) chance of dropping item or 90% (almost always, 9/10, there will be soul), you can't have from-to.
-
[1.9] Apply redstone in a remote location
You could request a feature. Something along these lines: RedstonePoweredEvent - fired when BlockPos is asked if it provides power and returns integer value 0-15 of signal strength. Event would be useful I think. You could have remote powering, disabling power in things you don't want to provide power, even cutting signals of redstone. Question is - how hard would it be to implement it - this depends of centralization of "providesPower" calls. Worth giving a shot (or doing PR yourself). Note: totally theoretical, last time I did power/redstone stuff was pre 1.3...
-
[1.8.9] Custom Item Change
You should put that in your language file. Sorry, I was under wrong impression. I mean since registered name points at name in lang, why not return colorized name from lang file. I was wrong
-
[1.8.9] Recording block owner
Entity#getUniqueID() UUID#getLeastSignificantBits() UUID#getMostSignificantBits() NBT#setLong("L", least) NBT#setLong("M", most) new UUID(NBT#getLong("L"), NBT#getLong("M")) if (player ref not present) do: WeakReference<EntityPlayer> player = World#getPlayerEntityByUUID(UUID) else return player.get() What else... Again - DO YOU NEED client to know about player held by TE? Know = display. Because "as well as which GUI to display on right-click." can be done from server, client doesn't need player there.
IPS spam blocked by CleanTalk.