MCenderdragon
Forge Modder-
Posts
130 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MCenderdragon
-
https://github.com/MinecraftForge/MinecraftForge/issues/3843#issuecomment-294181631
-
Block.getBlockFromName("minecraft:dirt");
-
I am currently trying somekind of connected textured with Blockstates, but it seems some parts of the Forge Blockstates are broken. This is working and all variants (64) are displaying a cube with the same texture for each side. I am using forge 13.20.0.2282 { "forge_marker":1, "defaults": { "model":"cube", "textures":{ "down":"fp:blocks/d0000", "up":"fp:blocks/d0000", "north":"fp:blocks/d0000", "south":"fp:blocks/d0000", "west":"fp:blocks/d0000", "east":"fp:blocks/d0000" } }, "variants":{ "down":{"true":{},"false":{}}, "up":{"true":{},"false":{}}, "north":{"true":{},"false":{}}, "south":{"true":{},"false":{}}, "west":{"true":{},"false":{}}, "east":{"true":{},"false":{}}, "inventory":[{}] } } But if I add only one special variant everything breaks. { "forge_marker":1, "defaults": { "model":"cube", "textures":{ "down":"fp:blocks/d0000", "up":"fp:blocks/d0000", "north":"fp:blocks/d0000", "south":"fp:blocks/d0000", "west":"fp:blocks/d0000", "east":"fp:blocks/d0000" } }, "variants":{ "down":{"true":{},"false":{}}, "up":{"true":{},"false":{}}, "north":{"true":{},"false":{}}, "south":{"true":{},"false":{}}, "west":{"true":{},"false":{}}, "east":{"true":{},"false":{}}, "down=true,east=false,north=false,south=false,up=false,west=false":{ "textures":{ "down":"fp:blocks/d0000", "up":"fp:blocks/d0000", "north":"fp:blocks/d0010", "south":"fp:blocks/d0010", "west":"fp:blocks/d0010", "east":"fp:blocks/d0010"} }, "inventory":[{}] } } The Block class public class BlockQuantanium extends Block { public static final PropertyBool up = PropertyBool.create("up"); public static final PropertyBool down = PropertyBool.create("down"); public static final PropertyBool north = PropertyBool.create("north"); public static final PropertyBool east = PropertyBool.create("east"); public static final PropertyBool south = PropertyBool.create("south"); public static final PropertyBool west = PropertyBool.create("west"); public static final PropertyBool[] faces = new PropertyBool[]{down,up,north,south,west,east}; public BlockQuantanium() { super(Material.ROCK); setCreativeTab(FPMain.tab_deco); } @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, faces); } @Override public int getMetaFromState(IBlockState state) { return 0; } @Override public IBlockState getStateFromMeta(int meta) { return super.getStateFromMeta(meta); } @Override public IBlockState getActualState(IBlockState state, IBlockAccess w, BlockPos pos) { for(int i=0;i<faces.length;i++) { state = state.withProperty(faces[i], w.getBlockState(pos.offset(EnumFacing.getFront(i))).getBlock() == this); } return state; } }
-
what is your registration code for the block, and render registration for block and item ?
-
[1.11][Solved] Rendering huge amounts of Blocks
MCenderdragon replied to MCenderdragon's topic in Modder Support
Ok I fixed it, too things too note here for the others: 1.) at conversation to the IntBuffer somehow the bytes got twisted so everything was wrong, i fixed this by accessing the vertexCount and the byteBuffer field or the VertexBuffer via reflection 2.) to propeply read/write and edit the data inside the buffer you need to use ByteOrder.LITTLE_ENDIAN, but too let it work while rendering it has to be ByteOrder.BIG_ENDIAN, so just changed this to little befor editing and back to big to let it render. -
well you need to extract the posotion floats from the int[] you are passing an manualy change them with sin and cos
-
[1.11][Solved] Rendering huge amounts of Blocks
MCenderdragon replied to MCenderdragon's topic in Modder Support
Ahh okay, I will try to check the bytes before and after again, maybe only some bytes are wrong but still result in no gl error. -
[1.11][Solved] Rendering huge amounts of Blocks
MCenderdragon replied to MCenderdragon's topic in Modder Support
Also I noticed the FastTESR starts and stops the Tesselator from the renderTileEntityAT even if I tell the block to be have an AnimatedModel, dosnt all FastTESR should render at once? -
just look at the fields in side the playerSP class there IS somewhere the net handler. if the field is not public there IS somewhere a getter.
-
Minecraft has not a netHandler, the netHandler is inside the player.
-
Well normaly this is how UVs work, UV are float/double from 0 to 1. Are you sure Forge is doing this wrong ?
-
NetHandlerPlayClient != EntityPlayerSP you wont find getPlayerInfo inside the wrong class. also just look at the fields in the EntityPlayer and check what is a NetHandler
-
I dont know that, but an untamed horse is carrying the player along and moves and rotate correct, so you should find it in the Horse or a super class of it.
-
My Mod isn't showing up whenever I run the Forge Client
MCenderdragon replied to GreenSheep123's topic in Modder Support
Does it work if you remove the "acceptedMinecraftVersion" part from the annotation from your main class ? -
My Mod isn't showing up whenever I run the Forge Client
MCenderdragon replied to GreenSheep123's topic in Modder Support
then post your mod class please. also check if your project setup is correct. -
we ingame its still the X-Y-Z movement that is calculated back with sin and cos.
-
What do I need to know before I try to make a power system
MCenderdragon replied to kepler68's topic in Modder Support
well you need to know what is tranfered, and how to store them , in and int/flaot also do you need some kind of path tracing so the eergy knows were to flow to. Also to what extend do you plan your power system, simple like RF or complex like real V and A -
no srew this idea you cant control the wasd keys, you need to move the horse to the place. and also if 2 instaces are trying to move the horse what should then happens ? try to begin with an entity without anything mounted on it to move to the location you want. then you can just set the player xyz position to the place were the entity is, so it looks like the player is moving but i hostly dont kknow if this is an nice game feature to get controlled like that
-
NetHandlerPlayClient::getPlayerInfo , you get the netHandler from the EntityPlayerSP (this is inside Minecraft.class) and then you call the getPlayerInfo() methode
-
You most likely need to make your own horse (so a class extending the EntityHorse) so you can overwrite all need methods so the player can nolonger control the movement of a horse, then just use the tryMoveToXYZ method and it should work
-
[1.11][Solved] Rendering huge amounts of Blocks
MCenderdragon replied to MCenderdragon's topic in Modder Support
well lets asume this statement is wrong, what else is importent and inside the VertexBuffer ? Also is their anyother way to "bake" a custom block construction an render them? Also I need to translate and rotate them but if the rendering is working this is not so hard to achieve. -
The Pathfinding algorythm from minecraft is rather slow for big distances keep that in mind. So threading and spliting the path intopices or write an own path finding algorxthm is meybe needed.