Everything posted by shieldbug1
-
100% chance of spawning a random item in dungeon chest
Have you tried just lowering the percentage chance of each spawn?
-
[1.7.10] [SOLVED]Liquids in the Dimension problem
Sorry, I misread. Blocks shouldn't get replaced when you ADD blocks to an existing world, only when creating a new world. Are there any messages when you run it with the new blocks in console?
-
[1.7.10] [SOLVED]Liquids in the Dimension problem
You need to register during the pre-initialisation stage.
-
Maximum execution time When searching this forum
The search never really worked here anyway. It shows you posts from super long ago when someone posted something with exactly what you typed a few days ago.
-
Interaction with player in radius X
First of all, don't ever use @SideOnly. Secondly, there is a method to play sounds at a radius in the world class. I don't have my IDE open right now, but I'm sure you can find it with some looking.
-
[1.7.10] Fake player help
Yes. You would create your own entity, with it's own inventory, AI, etc.
-
[1.7.10] Fake player help
That's definitely not what the fake player class is for. Fake players can't move at all. Think of them as 'player accessors'.
-
Proper way to serialise blocks
It's not that bad if you have some time on your hands, honestly. I've been doing it to test and it's not that bad, especially if you call setPrettyPrinting for the serialiser.
-
Proper way to serialise blocks
The reason I'm using Json is because it's supposed to also be easily modified by an average user outside of the game. I'll go give what you suggested a go and see what I can manage, and post here again if I need any help. Thanks.
-
Proper way to serialise blocks
I have a Schematic class that allows me to have easier generation of things, that gets serialised using Json. I'm using GameData.getBlockRegistry().getNameForObject(block); to get the names ("minecraft:grass" for example), and Block.getBlockFromName(name); to get the block back. Is this the suggested way to save blocks (to allow for transfer between worlds)? Also, as a side note, is there any way to set multiple blocks at once? Because otherwise, setting blocks in a 3d plane takes O(n^3) time at best, and Minecraft doesn't support multithreaded world 'block setting' (or multithreaded anything, to be honest).
-
[1.7.10][KINDA-SOLVED] Player Log Out events.
You can try the WorldEvent.Unload maybe. When a player 'exits' the world also unloads.
-
[1.7.10] Minecraft Create World get: java.lang.NoSuchFieldException: sleepTimer
You have to use the srg name. You can find them in the gradle cache. Also, you should the ReflectionHelper class, it makes code a lot cleaner. For example: try { Field field = SomeClass.class.getDeclaredField("someField"); field.setAccessible(true); Object value = field.get(someClassInstance); } catch (ReflectiveOperationException e) { //Repeat with srg name } Turns to: Object value = ReflectionHelper.getPrivateValue(SomClass.class, someClassInstance, "someField", "srgName");
-
proper dimension teleportation?
Looking at the the entities code, it seems like you should be able to simple call Entity#travelToDimension(int dimensionID).
-
[1.7.10] Sending damage to the player.
Don't subclass the events. @SubscribeEvent public void onPlayerTick(TickEvent.PlayerTickEvent event) { if(event.side.isServer() && event.phase.equals(TickEvent.Phase.START)) { //DO STUFF } }
-
Servers
Some mods are server-only, but most mods require being installed on the client too. It's different for each mod.
-
Event for blocks updating?
I don't think there is an event for that. Block updates are handled inside the relevant block classes themselves.
-
[1.7.10] Make custom machine use ore dictionary?
I think getOres returns a list. You'll have to iterate through it and add a recipe for each ore.
-
[1.7.10] Recipe wrong
I haven't looked at it, but I'd assume that's just the way of differentiating between the values and the recipe itself (probably with instanceof checks against char and String respectively). If you mean what the difference between double and single quotes is, that is a Java question.
-
[1.7.10] Recipe wrong
Try adding the spaces to the last "s" " s " "sss" " s " //INSTEAD OF " s " "sss" "s"
-
[1.7.10] Recipe wrong
I'm afraid the images aren't loading for me. Could you describe the problem?
-
1.7.10 1231 is failing in setupDecomWorkspace
Yes.
-
[1.7.10]How to make zombies not burn in daylight
Use the LivingUpdateEvent. If the entity is a zombie, then check Entity#isBurning() and use Entity#extinguish(). That should work.
-
[1.7.10] Fatal Error
Where do you register your packets?
-
[1.7.10] Fatal Error
Are you sending any packets by chance? If so, show us your packet (IMessage) code, please.
-
[SOLVED]Nothing happens after installing the forge 1.7.10
Java 8 is supported and has been for at least a month. Update your forge.
IPS spam blocked by CleanTalk.