Everything posted by Draco18s
-
How to add texture to block 1.10.2
You're already using ModelLoader.setCustomModelResourceLocation. The only problem is, this class is client-side-only, which means you need to reference it only through your ClientProxy class. You should also do it inside the ModelRegistryEvent.
-
[Solved] Access to other mods (requirements?) (1.12.1)
Right click anywhere in the Package Explorer window. Build Path -> Configure Build Path. Libraries tab. Add External Jars.
-
[1.12] Replace EntityItem with new entity type, but keep motion when tossed?
We would like to see the whole main class and the whole class where this line is in order to make sure that it is being called.
-
[SOLVED] [1.12] How to get a List of TileEntities
https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/util/AdvancementUtils.java#L20 Here's an example. It does not point to the same object you're interested in, it just shows how to use ReflectionHelper.
-
Need Help with 1.12 Custom Item Renderers
Override Item#getDurabilityForDisplay
-
[SOLVED] [1.12] How to get a List of TileEntities
Use ReflectionHelper. (Note: The class name is not "avh.f" it's "avh" with a field name of "f", but you don't need Notch names anyway)
-
[SOLVED] [1.12] How to get a List of TileEntities
You need the SRG name as well. You can get it from MCPbot.
-
[SOLVED] [1.12] How to get a List of TileEntities
TileEntity has a REGISTRY field that is like all other registries. You will need to use reflection to access it, however.
-
[1.12.1] [Solved] Cannot interact with custom entity
Oh, you're extending Entity directly. I missed that. Not sure what's preventing you from interacting with it then.
-
[Solved] Access to other mods (requirements?) (1.12.1)
You still need to put any access to FooAPI into another class. The JVM doesn't know at the time that it reads your main mod file from disk that FooAPI will never be accessed, so it goes to check to see if it knows where FooAPI is, won't find it, and will crash. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/FarmingBase.java#L196-L198 I don't know why you're getting the error you are when compiling, though. Did you add FooAPI to your build path in Eclipse?
-
[Solved] Access to other mods (requirements?) (1.12.1)
Well, for one, you have to wrap your API getter in a separate class. If FooAPI isn't available at runtime, Minecraft will crash when it instanciates your main class because FooAPI can't be found. That said, you need to do this in the dependencies section of your build.gradle file: compile files('lib/FooBar.jar')
-
[1.12.1] [Solved] Cannot interact with custom entity
Jesus christ on a crutch @Override is just an IDE directive, it isn't actually compiled to bytecode
-
Block#breakBlock vs Block#getDrops for handling item drops
Ah, you're doing something different than what I expected. To answer your question about the shulker box being an anomaly: I would say maybe, but anyone who wants to do the same thing that looks at the shulker box would copy it.
-
[1.12.1] [Solved] Cannot interact with custom entity
Then you need to not override the method. Overriding a method to do nothing is almost never the correct thing to do. That or call the correct super method...super.readEntityFromNBT
-
[1.12]Add Velocity not working from Packet thread
You're reaching across threads here. See the warning: http://mcforge.readthedocs.io/en/latest/networking/simpleimpl/
-
How to add texture to block 1.10.2
I am not going to download a random zip file from the internet. Properly host your code somewhere, such as a git repository.
-
[1.12] How to disable some mod recipe files via config file
Note that if you do it that way and have an Advancement set to grant the player the recipe, it will throw an error upon world load.
-
[1.11.2] How to call player.setAngles(float dx,float dy) ?
I found two possibilities: Entity#turn(float, float) Entity#setRotation(float, float)
-
Underground structures stacking on each other.(screenshots)
Right click -> References -> Find in workspace -> learn
-
Block#breakBlock vs Block#getDrops for handling item drops
All of my container blocks use removedByPlayer to drop their contents. This is due to there having been an issue at one point in 1.10 where the TileEntity would have been removed before breakBlock was called, causing either a NPE or an otherwise inaccessible container. In fact, most mods might still be doing it this way because of the default behavior of breakBlock: public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { if (hasTileEntity(state) && !(this instanceof BlockContainer)) { worldIn.removeTileEntity(pos); } } No one uses BlockContainer any more because it's an unnecessary vanilla artifact. Block#getDrops is a bad hook because it's only called by World#destroyBlock which is not invoked during the standard punch/mine/harvest logic, it's called by Entity AI tasks (Wither, Silverfish, Rabbits), the Fill command, buckets (when placing/taking fluids), and a couple of plants (lilypads when a boat collides with them, corous plants and cactus if it can't survive at its current blockpos), etc.
-
[1.12.1] [Solved] Cannot interact with custom entity
Without the readEntityFromNBT and writeEntityToNBT methods calling super, your entity on the client can't be synchronized with the copy on the server.
-
Item not texturing 1.12 forge coding
Ok, zeroth, NEVER EVER POST CODE AS IMAGES. JESUS. 1) You need to use the RegistryEvents, you can't just shove items into the registry like that. You have to do it at the proper time in the proper way. 2) You can't use ModelLoader.setCustomModelResourceLocation in common code, it is marked as SideOnly(CLIENT) so you must call that through your proxy 3) You aren't even calling registerRenderer anyway
-
[1.12] Minecraft rendering wrong variant/axis
Has to do with the parent class, likely. BlockLog already declared that LOG_AXIS property was a part of the BlockstateContainer and your one messed that up.
-
[1.10] Prevent automation extract from specific slots
Facing of Null is used when no specific direction is involved. Typically referred to as "internal use" but it is not necessarily the case that it's the player accessing it. Could be that the block was broken and is dropping its contents, could be a "peek" mod that opens a container to look at the contents. However, automation (hoppers, etc) should always pass in a non-null side.
-
How to draw item models in world
You can even create a local variable, but yes.
IPS spam blocked by CleanTalk.