Posted August 20, 20169 yr 1. How to make a empty bucket pick up the custom fluid without using forges universial bucket. Bucket:http://pastebin.com/q1ffU7La 2. SOLVED http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
August 21, 20169 yr 1. How to make a empty bucket pick up the custom fluid without using forges universial bucket. Bucket:http://pastebin.com/q1ffU7La You need to subscribe to FillBucketEvent like UniversalBucket does. Why not just use the universal bucket, though? 3. How to make the fluid destroy portal blocks: Fluid block: http://pastebin.com/HRAx8qcP In your constructor, add Blocks.PORTAL to the BlockFluidBase#displacements map. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
August 21, 20169 yr Author 2. public BlockEnderium() { super(FluidEnderium.instance, MaterialEnderium.enderium); displacements.put(Blocks.PORTAL, false); displacements.put(Blocks.END_PORTAL, false); } Doesn't work nor does: public BlockEnderium() { super(FluidEnderium.instance, MaterialEnderium.enderium); displacements.put(Blocks.PORTAL,true); displacements.put(Blocks.END_PORTAL, true); } http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
August 21, 20169 yr Author 1. this doesn't work: @SubscribeEvent(priority = EventPriority.LOW) public void onFillBucket(FillBucketEvent event) { if (event.getResult() != Event.Result.DEFAULT) { // event was already handled return; } // not for us to handle ItemStack emptyBucket = event.getEmptyBucket(); if (emptyBucket == null) { return; } // needs to target a block RayTraceResult target = event.getTarget(); if (target == null || target.typeOfHit != RayTraceResult.Type.BLOCK) { return; } World world = event.getWorld(); BlockPos pos = target.getBlockPos(); ItemStack singleBucket = emptyBucket.copy(); singleBucket.stackSize = 1; event.setResult(Event.Result.ALLOW); event.setFilledBucket(new ItemStack(this)); } http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
August 21, 20169 yr This code worked for me. Are you definitely using your BlockEnderium class? As for the bucket, try debugging it yourself. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
August 21, 20169 yr Author Ok now 2 works. Only 1 left, I will try to debug it http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.