lupicus
Members-
Posts
49 -
Joined
-
Last visited
-
Days Won
1
Everything posted by lupicus
-
Also, the resource location in the atlas isn't correct, should be: new ResourceLocation("mohard", "entity/altar_adorn")
-
Trying to make a block that the player can stand in (VoxelShapes)
lupicus replied to perigrine3's topic in Modder Support
That is not going to be good for the bottom block (still pretty much a solid cube). The simple way to get that is: private static final VoxelShape INSIDE = makeCuboidShape(2.0D, 2.0D, 0.0D, 14.0D, 16.0D, 14.0D); protected static final VoxelShape SHAPE = VoxelShapes.combineAndSimplify( VoxelShapes.fullCube(), INSIDE, IBooleanFunction.ONLY_FIRST); -
Trying to make a block that the player can stand in (VoxelShapes)
lupicus replied to perigrine3's topic in Modder Support
Your shape is strange, but the top is solid, so you need to open it and make it a little wider so you can fit into. Make the 4th and 5th parameters for INSIDE 14.0D (make wider) and 16.0D (make hole in top). It still is a strange shape. -
I'm assuming you are past the initial problem, so you need to provide more information.
-
I'm using the latest and works fine when you change the settings, but if you don't like to make those changes then load older version.
-
It says it is running Java 16. You are probably using the newer Eclipse which comes with 16. You need to change setting to point to one of the other versions of Java. Go to Preferences and check you have compiler compliance level set to 1.8, then check/fix Installed JREs and Execution Environment settings.
-
You are using the wrong version of Java, you should use Java 8
-
[1.16.4] Custom obj Block Model's Unusual Brightness
lupicus replied to FishBoneEK's topic in Modder Support
Not sure if they are documented somewhere, but I found these in ObjLoader#read You can find other loaders in ModelLoaderRegistry#init, then follow to their read method for their options. -
[1.16.4] Custom obj Block Model's Unusual Brightness
lupicus replied to FishBoneEK's topic in Modder Support
I believe one fix would be to add "ambientToFullbright": false, in the obj model json files -
So you tried this? public ObsidianGlass() { super(AbstractBlock.Properties.of(Material.GLASS) .strength(25, 1200) .sound(SoundType.GLASS) .harvestLevel(3) .harvestTool(ToolType.PICKAXE) .requiresCorrectToolForDrops() ); }
-
Can you post the line that defines the block?
-
nothing, but if you are using the old mappings then the call is setRequiresTool()
-
Did you also call requiresCorrectToolForDrops() on the block properties?
-
[1.16.5] Cannot change custom item durability in use()
lupicus replied to RCKraken's topic in Modder Support
The new code you posted works, but you are probably in creative mode which restores item damage. -
[1.16.5] Cannot change custom item durability in use()
lupicus replied to RCKraken's topic in Modder Support
you should just apply damage to the current stack instead of creating a new stack (at least the way you are doing it) because you will lose other settings, like enchantments -
Add protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) { builder.add(LEVEL); } snippet taken from the CauldronBlock with slight edit
-
[1.16.4] Registering EntityRenders returns errors
lupicus replied to than00ber1's topic in Modder Support
I made something similar to your code and it seems to work, so the problem appears with some code not posted -
For the MONSTER, there still a light usage in MonsterEntity#getWalkTargetValue which is used during spawning, so you probably want to override and return 0.0F, or do something based on the block below. For the WATER_CREATURE, I'm assuming that your Plus mob isn't registered as a WATER_CREATURE, using different types for register and spawners can cause problems like this.
-
Your code still using spawnInfo.getEntityTypes() which for enderman is only going to match 2 biomes. It looks like your mob extends an AnimalEntity, which wants to spawn on grass blocks (probably none are in the end), since you use stuff from MonsterEntity, then you could copy their code (adjust as necessary) into your mob: @Override public float getWalkTargetValue(BlockPos pos, IWorldReader world) { return 0.5F - world.getBrightness(pos); }
-
Set<EntityType<?>> entityTypes = spawns.getEntityTypes(); is returning entities with spawn costs, which only 2 nether biomes have them for enderman. Try something like this: List<Spawners> list = spawns.getSpawner(EntityType.ENDERMAN.getCategory()); for (Spawners entry : list) { if (entry.type == EntityType.ENDERMAN) { int weight = 10; if (event.getCategory() == Biome.Category.NETHER) { weight = 1; } spawns.addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(ModEntities.MY_MOB, weight, 1, 4)); break; } }
-
When colors are using float type then you use values from 0 to 1. When colors are using int then you use values from 0 to 255. So, you can change to this.addVertex(matrix4f, matrixNormal, vertexBuilder, 1, 0, 0, 1, combinedOverlay, combinedLight);
-
[1.16]Help with treads with other blocks in your custom model
lupicus replied to Zemelua's topic in Modder Support
Could be up to 7 times. You currently pass side to buildQuad. Do something like this for each add call you make: if (side == Direction.NORTH) quads.add(buildQuad(Direction.NORTH, north, 1, 1, 0, north.getMinU(), north.getMinV(), 1, 0, 0, north.getMinU(), north.getMaxV(), 0, 0, 0, north.getMaxU(), north.getMaxV(), 0, 1, 0, north.getMaxU(), north.getMinV() )); -
[1.16]Help with treads with other blocks in your custom model
lupicus replied to Zemelua's topic in Modder Support
It is asking for quads for the NORTH side. It will call getQuads for all 6 sides and one extra for general quads (when side == null) not for a specific side. So by returning all the quads for each call then you are rendering the sides multiple times. -
How to find an entity the player is attacking in an event? - 1.16.5
lupicus replied to BliX5's topic in Modder Support
Try adding this when canceling: event.setSwingHand(false); -
[1.16]Help with treads with other blocks in your custom model
lupicus replied to Zemelua's topic in Modder Support
I think part of problem is that in getQuads, you are returning north and south faces and ignoring the quads for the requested side (method argument). The rendering code calls Block.shouldSideBeRendered to check if quads for a given side are drawn or skipped.