Everything posted by TallYate
-
[1.15.2] getBlockState does not updaate block for all players
So this should work? @Override public ActionResultType onItemUse(ItemUseContext context) { if(!context.getWorld().isRemote) { if(context.getWorld().getBlockState(context.getPos()).getBlock()==Blocks.BEDROCK) { context.getWorld().setBlockState(context.getPos(), BlockInit.busted_bedrock.getDefaultState(), 3); context.getItem().damageItem(10000, context.getPlayer(), player -> {}); } return ActionResultType.PASS; } else { return ActionResultType.FAIL; } }
-
[1.15.2] getBlockState does not updaate block for all players
@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.
-
[1.15.2] My mod works on the singleplayer, but not on a server
Thanks guys
-
[1.15.2] Smoothly interpolating Power Generation
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; }
-
[1.15.2] My mod works on the singleplayer, but not on a server
The server doesn't have any errors, it just shows a normal disconnect
-
[1.15.2] My mod works on the singleplayer, but not on a server
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
-
[1.15.2] My custom recipe type is not working properly [Solved]
Thanks everyone, it works now!
-
[1.15.2] My custom recipe type is not working properly [Solved]
I changed it to ICraftingRecipe but still have the same issue
-
[1.15.2] My custom recipe type is not working properly [Solved]
Where do I put that
-
[1.15.2] My custom recipe type is not working properly [Solved]
So how do I make the crafting table check for my recipe?
-
[1.15.2] My custom recipe type is not working properly [Solved]
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.
-
[1.15.2] My custom recipe type is not working properly [Solved]
oops I typed "now" instead of "not"
-
[1.15.2] My custom recipe type is not working properly [Solved]
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-
IPS spam blocked by CleanTalk.