Everything posted by MineModder2000
-
(SOLVED) [1.14.4] Modify Vanilla Mob Spawning
Yeah I had figured that out. I also just figured out how to remove the specific entity from the index ?
-
(SOLVED) [1.14.4] Modify Vanilla Mob Spawning
biome.getSpawns(EntityClassification.CREATURE).remove(EntityType.PIG);
-
(SOLVED) [1.14.4] Modify Vanilla Mob Spawning
for (Biome biome : ForgeRegistries.BIOMES) { biome.getSpawns(EntityClassification.CREATURE).clear(); biome.getSpawns(EntityClassification.CREATURE).add(new Biome.SpawnListEntry(EntityType.PIG, 1, 3, 5)); } I can clear all existing spawns from a biome using the clear method, which allows me to add a spawn exactly how I want, but then everything is gone. There are remove methods but they don't seem to be able to remove specific entities. Anyone know how to do this?
-
(Solved)[1.14.4]How do I create an addon mod?
You will need an understanding of Java, an IDE (e.g. Eclipse), and then knowledge of working with Forge (assuming it's a forge based mod).
-
(SOLVED) [1.14.4] Check if it's raining on a Block
Oh I just realized that there is a canBlockSeeSky(pos) method inside of world, that's what I needed to check in addition. All working now ?
-
(SOLVED) [1.14.4] Check if it's raining on a Block
Actually not so unassigned, this doesn't account for covering. If a block is a under a tree for example, it won't get rain on it, but according to these checks it is raining.
-
(SOLVED) [1.14.4] Check if it's raining on a Block
I need to check if it's raining on a particular block. The isRaining() method checks if it's raining globally, the isRainingAt() method just doesn't seem to work, it always returns false. @SubscribeEvent public void EntityPlaceEvent(EntityPlaceEvent event) { World world = event.getEntity().world; BlockPos blockpos = event.getPos(); BlockState blockstate = world.getBlockState(blockpos); if (event.getState().getBlock() == Blocks.CAMPFIRE && world.isRainingAt(blockpos)) { world.setBlockState(blockpos, blockstate.with(CampfireBlock.LIT, false)); } }
-
(SOLVED) [1.14.4] Get Biome of targeted Block
I love you, didn't know this event existed, but it's definitely the right one, thanks. PS : Interesting username....
-
(SOLVED) [1.14.4] Get Biome of targeted Block
The code isn't working as intended, it's going by the block the player is standing on not looking at.
-
(SOLVED) [1.14.4] Get Biome of targeted Block
Well it's never naturally null, that's only if I comment out the code that sets it. The bigger problem is getting the blockPos of the block the player is looking at.
-
(SOLVED) [1.14.4] Get Biome of targeted Block
As stated it's fetching the position of the block that the player is standing on. If it's null the game crashes.
-
(SOLVED) [1.14.4] Get Biome of targeted Block
Anyone?
-
(SOLVED) [1.14.4] Check if Block is isolated?
Yeah nvm, I didn't think this question through. Sorry, my bad.
-
(SOLVED) [1.14.4] Check if Block is isolated?
Is it possible to check if a block is not connected to other blocks of the same type?
-
(SOLVED) [1.14.4] Get Biome of targeted Block
I tried to implement the code from debug overlay : RayTraceResult result; BlockPos blockpos = null; result = event.getPlayer().func_213324_a(20.0D, 0.0F, true); if (result.getType() == RayTraceResult.Type.BLOCK) { blockpos = ((BlockRayTraceResult)result).getPos(); } if ((event.getPlayer().getHeldItemMainhand().getItem() == Items.GLASS_BOTTLE || event.getPlayer().getHeldItemMainhand().getItem() == Items.WATER_BUCKET) && (!event.getWorld().getBiome(blockpos).toString().contains("River"))) { event.setCanceled(true); } But its still going by the block that the player is standing on, not looking at.
-
(SOLVED) [1.14.4] Get Biome of targeted Block
if (this.leftClickCounter <= 0 && !this.player.isHandActive()) { if (leftClick && this.objectMouseOver != null && this.objectMouseOver.getType() == RayTraceResult.Type.BLOCK) { BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.objectMouseOver; BlockPos blockpos = blockraytraceresult.getPos(); if (!this.world.isAirBlock(blockpos)) { Direction direction = blockraytraceresult.getFace(); if (this.playerController.onPlayerDamageBlock(blockpos, direction)) { this.particles.addBlockHitEffects(blockpos, blockraytraceresult); this.player.swingArm(Hand.MAIN_HAND); I don't understand this code, objectMouseOver is not set anywhere in the class, so how is it being used?
-
(SOLVED) [1.14.4] Get Biome of targeted Block
I don't understand what function, what existing client side code? What does running a ray trace mean?
-
(SOLVED) [1.14.4] Get Biome of targeted Block
Any examples docs?
-
(SOLVED) [1.14.4] Get Biome of targeted Block
Okay so the BlockRayTraceResult constructor takes the following : Vec3d, Direction, BlockPos, Boolean. I think I got the correct Vec3d and Direction, but I am not sure how to get the targeted Block, so I can get it's position. @SuppressWarnings("deprecation") @SubscribeEvent public void rightClickItem(RightClickItem event) { BlockRayTraceResult result; result = new BlockRayTraceResult(event.getEntityPlayer().getLookVec(), event.getFace(), event.getPos(), false); if ((event.getEntityPlayer().getHeldItemMainhand().getItem() == Items.GLASS_BOTTLE || event.getEntityPlayer().getHeldItemMainhand().getItem() == Items.WATER_BUCKET) && (!event.getWorld().getBiome(result.getPos()).toString().contains("River"))) { event.setCanceled(true); } }
-
(SOLVED) [1.14.4] Get Biome of targeted Block
I should've specified, I want this check to happen when the player is holding an item, so the RightClickItem event is what I want cancelled when the block is in the wrong biome. It actually doesn't work that bad the way I have it, it would just be better if it was based on the targeted block rather than the block the player is on.
-
(SOLVED) [1.14.4] Get Biome of targeted Block
I am using the event.getWorld().getBiome() method for RightClickItem Event. It takes a position as a parameter. If I use event.getPos() I get the position the player is standing in, but I want the position of the block being targeted, if possible. - Thanks.
-
(SOLVED) [1.14.4] Creating Config File
Well I used a traditional Java technique, and got it working via a config text file. This works fine, eventually though, I would like to make an in game GUI.
-
(SOLVED) [1.14.4] Creating Config File
I am getting requests for configurable options for a mod I released recently, but don't know how to go about it. Preferably, I would implement this via in game GUI, but a config file wouldn't be bad either, if its easier. Please help, thanks.
-
How create a custom mob / entity in 1.14 and above
Because I have it working now of course ?
-
(SOLVED) [1.14.4] Custom Spawn Conditions
I found a way to do this actually using chunk inhabited time.
IPS spam blocked by CleanTalk.