Everything posted by Luis_ST
-
What is the correct way to create a block in 16.5
your code looks okay, place post the complete log
-
What is the correct way to create a block in 16.5
post a git repo of your mod so i can use debugger
-
What is the correct way to create a block in 16.5
add the properties in the constructor of the block and the supplier looks like this: BarrierBlock::new or keep the properties in the constructor and the supplier looks like this () -> new BarrierBlock(Block Properties)
-
How to get the server Player Entity
do not use "@OnlyIn(Dist.CLIENT)" and this is the worng way to do this. whenever a screen is opened, this is prevented and your screen is opened you also create an infinite cycle (StackOverflowError), you create a container that triggers the event again when exactly do you want to open a container?
-
How to get the server Player Entity
show your code, so that I can understand which "side" (server|client) your code is execute
-
How to get the server Player Entity
where exactly do you need a ServerPlayerEntity
-
How to get the server Player Entity
Minecraft.getInstance().player will return a ClientPlayerEntity, you can't get the ServerPlayer via Minecraft.getInstance().player
-
[1.16.5] ExceptionInInitializerError when registering custom Biome with custom SurfaceBuilder
thanks that fixed the problem I'll change that later, but thanks for your help
-
[1.16.5] ExceptionInInitializerError when registering custom Biome with custom SurfaceBuilder
like that:? public static final RegistryObject<SurfaceBuilder<SurfaceBuilderConfig>> DEFAULT_DEEPSLATE = SURFACE_BUILDERS.register("default_deepslate", DefaultDeepslateSurfaceBuilder::new); how exactly, is there a class/method i have to use. I currently use the vanilla registry because I have not found anything from forge for the registration I will think about this, but I will probably not move the biome to json because I hate json
-
[1.16.5] ExceptionInInitializerError when registering custom Biome with custom SurfaceBuilder
I am currently creating a custom dimension with custom biome. Since the dimension has no real surface that has to be created, i have used the default surfacebuilder (from vanilla), until now. but now i have created my own surfacebuilder for the biome. but now i get an error when registering the biome. this is the log: latest.log this is the registration class of my biome this is my biome and this my surfacebuilder
-
New monster doesn't attack player.
There are also a lot of vanilla examples that you could look at, e.g. ZombieEntity
-
Loot Table for structure [1.16.5]
look at a vanilla example, for example the desert pyramid, and there is a method that does that for you StructurePiece#createChest. The ResourceLocation parameter in the method is the storage location of the loottable
-
Help with intellij not including resources in build (1.12.2)
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
How do I make a translucent block?
use RenderTypeLookup#setRenderLayer in your FMLClientSetupEvent
-
[1.16.5] World Feature error, only 3x3 chunk area is load
thanks i try that
-
How do I make a translucent block?
what is this supposed to do? if you want your block to be transparent, you have to add a RenderType to it in FMLClientSetupEvent
-
[1.16.5] World Feature error, only 3x3 chunk area is load
my goal would be to generate a large main room with a lot of my custom ore, and to generate these several small rooms with less ore, the ore should be generated in the middle of the room, the rooms should also be connected with a kind of tunnel system. if I think about what I want to generate, it would be smartest to generate a structure instead of a featrure two more questions about structures: it is possible to generate structures in the code and not via nbt file and is there a vanilla structure that i can use as an example
-
[1.16.5] How to add Configured Feature to a vanilla biome?
Use the BiomeLoadingEvent
-
[SOLVED] 1.16.5 Completely stop Entity from moving
there is an event (EntityEvent.CanUpdate)
-
[1.16.5] World Feature error, only 3x3 chunk area is load
so i am not allowed to change the position in the feature makes sense after looking at the vanilla features so i have to create a placement for my feature, which then handle the position of the feature? But how do I put the bigger features? because my created feature is actually only a small part of what I want to generate. is there a vanilla example for a placement/feature of a larger feature, since the MonsterRoom feature is probably not suitable as an example for my purposes, or does it make more sense to create a structure for larger features and if so, how do I create these randomly because the structures are fixed, village houses, igloos, etc. ?
-
Render Player as in Bed [1.16.5]
look at a vanilla example, the bed... the methods startSleeping and stopSleeping in the LivingEntity class are also interesting for you
-
[1.16.5] World Feature error, only 3x3 chunk area is load
This is also the case, if I specify a position that is outside of these 8 chunks, there is an error on the console, but if I try to place a block outside of a 3 chunk radius, no block is placed, as already said outside the area no chunk seems to exist this is my feature: public class HardDeepslateFeature extends Feature<NoFeatureConfig> { public HardDeepslateFeature() { super(NoFeatureConfig.CODEC); } @Override public boolean place(ISeedReader seedReader, ChunkGenerator chunkGenerator, Random rng, BlockPos pos, NoFeatureConfig config) { Chunk chunk = (Chunk) seedReader.getChunk(pos); if (chunk.getPos().x % 20 == 0 && chunk.getPos().z % 20 == 0) { this.placeOre(seedReader, rng, pos); } return true; } protected void placeOre(ISeedReader seedReader, Random rng, BlockPos pos) { // Main Ore int y = MathHelper.nextInt(rng, 32, 128); this.generateOreVine(seedReader, rng, this.getNextPos(pos, 8, 8), y, 10); // Ore in chunk +1 +1 this.generateOreVine(seedReader, rng, this.getNextPos(pos, 24, 24), y, 20); // Ore in chunk +1 -1 this.generateOreVine(seedReader, rng, this.getNextPos(pos, 24, -24), y, 20); // Ore in chunk -1 +1 this.generateOreVine(seedReader, rng, this.getNextPos(pos, -24, 24), y, 20); // Ore in chunk -1 -1 this.generateOreVine(seedReader, rng, this.getNextPos(pos, -24, -24), y, 20); // Ore in chunk +5 +5 this.generateOreVine(seedReader, rng, this.getNextPos(pos, 88, 88), y, 40); // Ore in chunk +5 -5 this.generateOreVine(seedReader, rng, this.getNextPos(pos, 88, -88), y, 40); // Ore in chunk -5 +5 this.generateOreVine(seedReader, rng, this.getNextPos(pos, -88, 88), y, 40); // Ore in chunk -5 -5 this.generateOreVine(seedReader, rng, this.getNextPos(pos, -88, -88), y, 40); } protected BlockPos getNextPos(BlockPos pos, int x, int z) { return new BlockPos(z, pos.getY(), z); } // generate horizontal vine protected void generateOreVine(ISeedReader seedReader, Random rng, BlockPos pos, int y, int count) { int x = MathHelper.nextInt(rng, 0, 15); int z = MathHelper.nextInt(rng, 0, 15); for (int i = y; i < y + count; i++) { seedReader.setBlock(new BlockPos(pos.getX() + x, i, pos.getZ() + z), ModBlocks.HARD_DEEPSLATE.get().defaultBlockState(), i); } } }
-
[1.16.5] World Feature error, only 3x3 chunk area is load
I have created a custom feature which should generate my custom ore in the world, my ore should only generate in certain chunks with certain biomes, and this in a 5x5 chunk area (80x80 blocks), but after a lot of testing and fixing bugs, that's me noticed that my ore is only generated in a 3x3 chunk area, outside the area no chunk seems to exist. So is this intentional, or do I have to overwrite a method in my feature, or is this due to the "settings" of the ConfiguredFeature, or somewhere else?
-
[SOLVED] How can I do somehing with Keybindings?
create the keybinding Register the keybinding with ClientRegistry#registerKeyBinding in the FMLClientSetupEvent uses the ClientTickEvent to check whether your KeyBinding is pressed and send a custom packet to the server (using a SimpleChannel) execute the code / your action in the handle method of your custom message (packet) okay the whole thing was very theoretical, here a practical example KeyBinding Registration ClientTickEvent Message (Packet)
-
[Solved] world.setBlockState not updating all blocks
you should remove this because you are checking here if you are on the server (not on client) and the video shows that the server receives the changes but the client doesn't
IPS spam blocked by CleanTalk.