Everything posted by Draco18s
-
[1.14.4] Small issue with LivingDeathEvent
Your one about saving information for each player? You already have an answer.
-
1.16 Enumerate Deferred Registries to create Block Items
What? Why? Yes, but that still doesn't let you have different blocks in different tabs. No.
-
[1.16.1] Overriding vanilla recipes
Should just be creating a dummy one that's essentially impossible to obtain. I swear I have it around somewhere... Ah ha there it is. Couldn't find it last night. https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/resources/data/minecraft/advancements/recipes/misc/bone_meal.json
-
1.16 Enumerate Deferred Registries to create Block Items
No. I mean "don't use a list." public static void createBlockItems(final RegistryEvent.Register<Item> event) { final IForgeRegistry<Item> registry = event.getRegistry(); registry.register(new BlockItem(ModBlock.BlockA, new Item.Properties().group(ItemGroup.GROUP)).setRegistryName(ModBlock.BlockA.getRegistryName())); registry.register(new BlockItem(ModBlock.BlockB, new Item.Properties().group(ItemGroup.BLOCKS)).setRegistryName(ModBlock.BlockB.getRegistryName())); registry.register(new BlockItem(ModBlock.BlockC, new Item.Properties().group(ItemGroup.REDSTONE)).setRegistryName(ModBlock.BlockC.getRegistryName())); registry.register(new BlockItem(ModBlock.BlockD, new Item.Properties().group(ItemGroup.DECORATION)).setRegistryName(ModBlock.BlockD.getRegistryName())); } Also this line: IForgeRegistry blockRegistry = GameRegistry.findRegistry(Block.class).getRegistrySuperType(); Is useless, you never actually do anything with the blockRegistry. Objects.requireNonNull(block.getRegistryName()) RequireNonNull here is also useless. If it was null, the game would have already crashed. 12 blockItem.setRegistryName(Objects.requireNonNull(block.getRegistryName())); 13 registry.register(blockItem); setRegistryName returns the object, removing the need for a local variable.
-
1.16 Enumerate Deferred Registries to create Block Items
Don't use a giant massive list?
-
[1.16.1] Overriding vanilla recipes
Yes.
-
[1.14.4] Small issue with LivingDeathEvent
No. Use packets. Why does your client need to know this information?
-
[SOLVED][1.14.4] from config to Ingredient for ingredient list
A tag with nothing in it generates an empty list. An empty list is special in that it contains zero items and is not null.
-
[SOLVED][1.14.4] from config to Ingredient for ingredient list
You could include a JSON tag file with no items in it. The whole point is that "an empty list" is still a valid list.
-
[1.16.1] Overriding vanilla recipes
That's exactly what you need to do. Just remember to give a blank dummy for the original advancement.
-
[1.14.4] Small issue with LivingDeathEvent
IIRC this event is only fired on the server. And regardless, "will it work on the server?" is always true for things dealing with "game state" (and things dying is definitely game state information). Pretty much the answer is: "Does it involve visuals (textures, models), keyboard input, or sound files? No? Then it works on the server." Another way to tell is "is the 'client' in the package name?"
-
[1.16.1] Overriding vanilla recipes
One of them should name-match (I recommend the one that has the desired output, name the other one something like "{original}_override" or "{original}_dummy"). If for nothing else than so people know what it's for.
-
[SOLVED][1.14.4] from config to Ingredient for ingredient list
There's a way to check on the Java side if a tag exists.
-
[1.16.1] How to give a block a facing property like a Barrel
Textures is all about the json model file. Also, rather than extending Block you could extend one of the directional block classes (HorizontalBlock, etc) that already supplies most of that code already.
-
[1.16.1] How to order Items on a Creative Tab
What do you mean, "format"? Its a list. It's ordered by its very nature and accepts objects of a single type.
-
[Solved][1.16.1]Client works, but server crashes at packet handler.
Do not use only-in. Get the player from the context.
-
[1.15] Modifying Loot Tables [SOLVED]
Then your modifier is broken, as even an empty loot drop list will still invoke all modifiers.
-
[1.15] Modifying Loot Tables [SOLVED]
You aren't supposed to modify the original loot table json when using Loot Modifiers.
-
Number of items in a slot
ItemStack#count()?
-
[1.15.2] Fix order in world when re-sorting item registries
The fuck is wrong with: public void fill(NonNullList<ItemStack> items) { items.add( InitItems.PISTOL_COLT_1911.get(), InitItems.BULLET_CAL_45.get(), InitItems.PISTOL_CAL_45_PROTOTYPE_BASIC.get(), InitItems.BARREL_CAL_45_LIGHT.get(), InitItems.BARREL_CAL_45_MEDIUM.get(), InitItems.BARREL_CAL_45_HEAVY.get(), InitItems.MAG_CAL_45_SMALL.get(), InitItems.MAG_CAL_45_BIG.get(), InitItems.MAG_CAL_45_DRUM.get(), InitItems.MAG_CAL_45_BOX.get(), InitItems.GUN_BODY_LIGHT.get(), InitItems.GUN_BODY_MEDIUM.get(), InitItems.GUN_BODY_HEAVY.get(), InitItems.PIPE_CAL_45.get(), InitItems.GUN_GRIP.get(), InitItems.GUN_BUTT.get(), InitItems.ARMORED_GLASS_ITEM_BLOCK.get() ); }
-
Vanilla Loot Tables
GlobalLootModifiers. https://mcforge.readthedocs.io/en/1.15.x/items/globallootmodifiers/
-
Damage Held Sword On Event
Use a server event. Do not trust the client. The client is a lying cheating bastard.
-
[Solved][1.16.1]Client works, but server crashes at packet handler.
The packet class must exist on both sides. On the sender, its used to construct the binary data, on the receiver its used to read the binary data. This is why a Context object is passed to the packet handler.
-
[Solved][1.16.1]Client works, but server crashes at packet handler.
Show your code, but this is probably a case of Reaching Across Sides. Yep, here: https://github.com/kyazuki/DietMod/blob/1.16.1-forge/src/main/java/com/github/kyazuki/dietmod/network/CapabilityPacket.java#L29 Your packet exists on both sides. The context contains a reference to the relevant player.
-
[1.15.2] World-scoped global variables
Capabilities.
IPS spam blocked by CleanTalk.