
shieldbug1
Forge Modder-
Posts
404 -
Joined
-
Last visited
Everything posted by shieldbug1
-
100% chance of spawning a random item in dungeon chest
shieldbug1 replied to Mctittles's topic in Modder Support
Have you tried just lowering the percentage chance of each spawn? -
[1.7.10] [SOLVED]Liquids in the Dimension problem
shieldbug1 replied to Elix_x's topic in Modder Support
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
shieldbug1 replied to Elix_x's topic in Modder Support
You need to register during the pre-initialisation stage. -
Maximum execution time When searching this forum
shieldbug1 replied to Mctittles's topic in General Discussion
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. -
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.
-
Yes. You would create your own entity, with it's own inventory, AI, etc.
-
That's definitely not what the fake player class is for. Fake players can't move at all. Think of them as 'player accessors'.
-
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.
-
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.
-
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).
-
You can try the WorldEvent.Unload maybe. When a player 'exits' the world also unloads.
-
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");
-
Looking at the the entities code, it seems like you should be able to simple call Entity#travelToDimension(int dimensionID).
-
Don't subclass the events. @SubscribeEvent public void onPlayerTick(TickEvent.PlayerTickEvent event) { if(event.side.isServer() && event.phase.equals(TickEvent.Phase.START)) { //DO STUFF } }
-
Some mods are server-only, but most mods require being installed on the client too. It's different for each mod.
-
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?
shieldbug1 replied to roberth332's topic in Modder Support
I think getOres returns a list. You'll have to iterate through it and add a recipe for each ore. -
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.
-
Try adding the spaces to the last "s" " s " "sss" " s " //INSTEAD OF " s " "sss" "s"
-
I'm afraid the images aren't loading for me. Could you describe the problem?
-
1.7.10 1231 is failing in setupDecomWorkspace
shieldbug1 replied to arungupta's topic in Support & Bug Reports
Yes. -
[1.7.10]How to make zombies not burn in daylight
shieldbug1 replied to Jetfan16ladd's topic in Modder Support
Use the LivingUpdateEvent. If the entity is a zombie, then check Entity#isBurning() and use Entity#extinguish(). That should work. -
Where do you register your packets?
-
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
shieldbug1 replied to lengkaikai's topic in Support & Bug Reports
Java 8 is supported and has been for at least a month. Update your forge.