TallYate
-
Posts
141 -
Joined
-
Last visited
Posts posted by TallYate
-
-
@Override public ActionResultType onItemUse(ItemUseContext context) { if(context.getWorld().getBlockState(context.getPos()).getBlock()==Blocks.BEDROCK) { context.getWorld().setBlockState(context.getPos(), BlockInit.busted_bedrock.getDefaultState()); context.getItem().damageItem(10000, context.getPlayer(), player -> {}); } return ActionResultType.PASS; }
This works fine, but with another player, they don't see the block change unless they left or right click it.
Not including a flag defaults to 3, which should update the block and send the change to clients. -
-
if addPower() accepts floats, just use a float
I don't know how that power system works but
int power = 2500/1600;float powerLeft = 2500;
for(int i=1600; i>0; i--){ //make this run once every tick instead of this for loop, but remember to make i work the same
power = powerLeft/i;
addPower(power);
powerLeft -= power;
} -
The server doesn't have any errors, it just shows a normal disconnect
-
This is the error I get when trying to connect
This is my mod:
https://github.com/TallYate/Bedrock-Things-mod--unfinished-/tree/master/src/main -
Thanks everyone, it works now!
-
I changed it to ICraftingRecipe but still have the same issue
-
Where do I put that
-
So how do I make the crafting table check for my recipe?
-
8 hours ago, diesieben07 said:
Yes, nobody will ask for that recipe type. Vanilla only checks it's own recipe types.
I put a recipe that implements this in here: https://github.com/TallYate/Bedrock-Things-mod--unfinished-/blob/master/src/main/resources/data/bedrockthings/recipes/charged_diamond_pickaxe.json
The matches part works (I can tell because I made it log stuff),
the getRecipeOutput works (I can get a preview of the recipe),and the getIngredients works (the correct ingredients are in the recipe preview).
But whenever matches returns true, getCraftingResult doesn't run at all. It doesn't log anything, and the crafting recipe doesn't work. -
oops I typed "now" instead of "not"
-
The matcher returns true, but then the getCraftingOutput does not run. Can you please help me?
Here is my mod
https://github.com/TallYate/Bedrock-Things-mod--unfinished-
[1.15.2] getBlockState does not updaate block for all players
in Modder Support
Posted
So this should work?