Everything posted by Draco18s
-
[1.14.4] [UNSOLVED] Server Thread Freezes After Entity Explodes
No, it will outright crash the dedicated server. You can't do this at all. You want to send a message to a player you need to send a message to a player.
-
[1.14] layout of a modpack
Classic sign of someone who isn't interested in producing content that actually works.
-
[1.12.2]Double-part block breaking problem
if (state.getValue(FACING) != EnumFacing.DOWN || state.getValue(FACING) != EnumFacing.UP) { That will always be true. If the facing is UP, then this looks like if(false OR true). False or true is true. If the facing is DOWN then it would read if(true OR false). False or true is true. A good thing, too, otherwise you'd get a NPE. BlockPos blockpos1 = pos.up(); You now set this value to the pos above the pos passed, as opposed to the pos above the bottom you just worked out. blockpos1 is now two above blockpos. if (state.getValue(PART) == BlockAFP.EnumPartType.DOWN && worldIn.getBlockState(blockpos1).getBlock() == this) { if (player.capabilities.isCreativeMode) { worldIn.setBlockToAir(pos); } worldIn.setBlockToAir(blockpos1); } So if the top location is this block, set the location passed to this method to air? Did you mean blockpos1? Oh also, you set it blockpos1 to air anyway regardless of creative mode, so I guess that check is pointless... else { //TODO how to check for the block? } Uh, what does this comment even mean?
-
on/off button for custom furnace
Well, you're doing it here. But you should actually be writing a pos there, not reading one.
-
[1.12.2] Transparent armor not rendering properly.
Armor stands assume only cutout transparency, not full alpha. Non-block items are also assumed to be cutout (though will render in your hand and in the inventory with transparency).
-
[1.14] layout of a modpack
I'm pretty sure I've left some comments on his videos about the mistakes he's perpetuating, but its not like anyone reads those.
-
on/off button for custom furnace
I posted this already, but sure, I'll do it again. https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/industry/client/gui/FilterGuiContainer.java#L83 That line is what you put in the "send stuff to server here" location. Or I should say, a line like that. You'll have to massage it to fit your class names, data details, and so on.
-
Distinguish singleplayer vs. multiplayer
Checking if the world is remote before doing client side things does not stop the server from crashing because the JVM does not know what that check cannot return true. In fact, it will crash before ever getting to this line. It crashes when the class is first loaded because it has to check to make sure it knows where all of the classes it loads the JVM knows where to find them. And it goes "Minecraft, Minecraft, OH GOD HELP ME JESUS, I CAN'T FIND THIS CLASS!" and dies.
-
on/off button for custom furnace
Oh god, oh god, oh god oh god ohgodohgodohgod There is virtually nothing correct about what you have. Some of it is still a direct copy of my own code without any attempt to change it. Your button still does fuckall because you gave it an empty stub method, that still takes a string parameter that you do fuckall with, have fuckall purpose for, and even have made it clear that you don't even know why you have it (which is true, because it does fuckall). What the fuck is this shit. Why are you creating a tile entity? Why are you trying to send a tile entity across the network? Not that you ever even call that method.
-
[1.14.4]What are API/Library and how to make a custom/own API/Library?
Those are two things: 1) A library is a set of widely used common functionality (Math is a good example, as is LWJL) 2) An API is a collection of exposed objects and interfaces that allow other programs/code to interface with another program/code without having to expose (make public) the implementation or source. An API is a contract that says, "I solemnly swear that these methods exist and do what the documentation says they do." You just do. I have one. I'm the only one using it, but I have it. It also happens to be both a library (I put my registry handlers in it) and an API (it is where I expose the interfaces for my capabilities).
-
Get the mob a player has killed and its custom name (Mutilplayer))
Show what you tried.
-
Increase target's damage via usable item
Where does it NPE? Also, use Logger, not System.out
-
[1.12.2] ERROR CRASH
What part of Didn't you understand?
-
Problems with new crops(corn, from tutorial by shadowfacts)
You don't, you listen for them. See also: https://mcforge.readthedocs.io/en/1.13.x/events/intro/
-
on/off button for custom furnace
sendPacketToServer() https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/industry/client/gui/FilterGuiContainer.java#L83 (Yes, you will need at least one new class)
-
Problems with new crops(corn, from tutorial by shadowfacts)
https://mcforge.readthedocs.io/en/1.13.x/concepts/registries/#registering-things
-
Problems with new crops(corn, from tutorial by shadowfacts)
Don't create RegistryEntries in static initializers, only do so in Forge controlled vents so that instantiation happens at a known and controllable point. Yes, only register your items on the client side. Nothing could go wrong here... Speaking of, this is wrong, you should be using the registry events. Use @ObjectHolder annotations instead. ModelLoader.setCustomModelResourceLocation exists for a reason. Do not use the Model Mesher. If you aren't on 1.12, update. This value is probably null here, because your block hasn't been registered yet. Also, D7 ninja'd me.
-
Efficiency of Event Handlers
Use one function and multiple if...else if..else statements. The difference between your examples is this: Which is faster? creeperCheck(); zombieCheck(); skeletonCheck(); or (a properly built, using else) deathCheck();
-
cry
You "create" tags by creating a json data file in modid/data/tags In this case, you want forge:copper, so you create a file called copper.json inside forge/data/tags/blocks For example: https://github.com/Draco18s/ReasonableRealism/tree/1.14.4/src/main/resources/data/forge/tags/items
-
How to check what mob a player killed on a mutiplayer server?
No. event.getSource().getTrueSource()
-
[1.14.4] Simple block with GUI
I haven't looked at non-TE systems myself, but looking at the Crafting Table is a start (be aware that the crafting table UI requires the player to interacting with only the crafting table).
-
cry
Vanilla handles those via JsonReloadListener instances. Unfortunately, these need to be registered with the MinecraftServer instance (have fun getting a reference to one) and the thing you need to register with is private. But if you manage that (note that my code is a Forge PR, so I can inject my manager directly), you pass the folder you care about to super and when the game loads, you get a list of resource locations found there.
-
[1.14.4] Simple block with GUI
Not a whole lot has changed, really. You register your gui handler differently,* but aside from some renames, everything is pretty similar. *Implement INamedContainerProvider on your TileEntity and call NetworkHooks.openGui()
-
cry
Yes, I am aware. I don't see why the code I supplied won't work. There is no current "data pack" feature that creates and registers blocks, if you want something like that, you're going to have to do it yourself.
-
[1.14.4] custom effect
The screen warp effect is almost certainly 100% tied into the game's main rendering system and hard coded to check for Nausea.
IPS spam blocked by CleanTalk.