Everything posted by Draco18s
-
Adding fish to rod 1.10
You may want to look at my helper class I use: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/util/LootUtils.java
-
[1.10] Custom Hanging Entity Issues
Ahh. I wouldn't have even thought to look there. Thanks.
-
[1.10] Custom Hanging Entity Issues
I've created a custom hanging entity that I want to use to replace the ItemFrame so that I can supply some additional logic. However, I have a couple issues. If I don't register the mod entity, then the entity shows up and behaves normally, except that it doesn't save (this makes sense: there's no entity ID mapping for it). However, if I add the registerModEntity line for it, then it doesn't show up in-game at all () but does save (as well as popping off if the block it's attached to is broken). Main mod class: itemFrameReplacement = new ItemItemFrame(); itemFrameReplacement.setRegistryName(new ResourceLocation("minecraft","item_frame")); itemFrameReplacement.setUnlocalizedName("frame"); try { GameRegistry.addSubstitutionAlias("minecraft:item_frame", Type.ITEM, itemFrameReplacement); } catch (ExistingSubstitutionException e) { e.printStackTrace(); } //commenting this line changes behavior: EntityRegistry.registerModEntity(EntityItemFrameReplacement.class, "item_frame_rep", 0, this, 48, 10, false);
-
Problems updating to 1.10
Your BlockStateContainer method doesn't declare that it has a FACING property: @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, new IProperty[] {TYPE}); } You need: @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, new IProperty[] {TYPE, BlockHorizontal.FACING}); }
-
[1.11] Updating Issues
Makes sense. I didn't know that it did more than just set the value.
-
Problems updating to 1.10
Your enums have this method: @Override public String getName() { return null; } You cannot return null here. Actually, that line is unhelpful. It's just a "new MyBlock()" line. The important bit is this bit:
-
Ok, what's Eclipse done now?
Thanks. I was darn sure that it cleared when I closed the search window, which is what I've done in the past (though I haven't even seen it highlight a whole bloody method, just the object name before).
-
[1.11] Updating Issues
What is the point of a private field with both methods to get the current value and modify the current value? That is, what is protected against that having the field public not protect against?
-
Making an item which is both stackable and damageable
A couple things: 1) any item stored in a chest (or other non-entityliving inventory) will not tick and thus not rot. 2) any item in an unloaded chunk (or in a player that is not connected to the server's inventory) will not tick and thus not rot. 3) how do you plan to handle combining a stack of "damage:1" meat with "damage:10" meat?
-
Ok, what's Eclipse done now?
What is this blue highlight and how do I get rid of it? It showed up when I did a search for existing usages of addPropertyOverride, opened up the ItemClock (it was faster than using the package explorer), and now it won't go away.
-
[1.10.2]AttachCapabilityEvent deprecated
It was deprecated in favor of: AttachCapabilitiesEvent<Entity>
-
[SOLVED] is there a way to get stack.stackSize in 1.11 ?
16.4 posts per day is not that many, especially for a moderator.
-
[1.8.9] onUsingTick never called
Unsurprisingly, -Xmx2G does too.
-
Creating a crafting handler the exports multiple items
@Override public int hashCode() { return item.hashCode(); } This won't work. ItemStack does not provide a hashcode implementation, therefor this wrapper class violates the hashcode/equals contract: That if equals returns true on two instances, hashcode must also return the same value. You will need to provide your own hash implementation. I suggest something along these lines: @Override public int hashCode() { return 37*item.getItem.hashCode() + item.getItemMetadata(); } Or use a HashUtility function: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/math/HashUtils.java Also, again:
-
[SOLVED] [1.10.2] Problem with saving items in my pan
What happens if there are no pancakes?
-
[1.10.2] How to trample crops when wearing certain armor
Which ticks even if you're not wearing the armor. Talk about overkill. (do your armor tick in one of your armor items, like the boots)
-
[1.11] Issues with Tab Icon Item
Huh?
-
[1.11] Updating Issues
On the other hand, it means (potentially) being able to toss item stacks of Air into the world, stacking them in your inventory, or pulling them out of the crafting grid. You'd have to do more work to prevent this, than I imagine you'd save by handling null correctly.
-
Creating a crafting handler the exports multiple items
The whole point of creating the wrapper was so you could do this: smeltmulti.get(stack);
-
[1.11] Updating Issues
That's super weird. Why would they change that?
-
(De)obfuscation / IClassTransformer / production environment
The question is "why?" Nearly everything anyone would want to do can be done without ASM, the rest should be submitted as a pull request to Forge.
-
(De)obfuscation / IClassTransformer / production environment
Coremods are heavily discouraged around here. Sooo....you are unlikely to get any help. That said: > a) what to do, to get the method names deobfuscated? > 1) asm patches are applied before deobfuscation You can't both of these. You're either waiting until after deobf, or you're not. You can't have both.
-
[SOLVED] [1.10.2] Problem with saving items in my pan
ItemStack newstack = stack.split(1);
-
[SOLVED] [1.10.2] Problem with saving items in my pan
You do know about stack splitting, yes?
-
Creating a crafting handler the exports multiple items
So you know how FurnaceRecpies has a method called getSmeltingResult? You need to do that for your own recipes.
IPS spam blocked by CleanTalk.