Everything posted by Xumuk
-
[1.12.2] Custom armor rotates different than player with small arms
And I can advise the author of the topic to see what methods the IDE offers from ModelBiped and ModelRenderer. Perhaps there are methods that will add support for changing the movement of the hand.
-
[1.12.2] Custom armor rotates different than player with small arms
I also made a armor with custom model, but the texture is very incorrectly displayed. In order not to create new threads, I'll ask my question here.
-
Custom Sign with custom Font
There is no registration in the minecraft init class method, there is just a new object created by the FomtRenderer indicating the path. Similarly, I create a new object in ClientProxy, and call it in the render.
-
Custom Sign with custom Font
Sorry, I don't know what you mean.
-
Custom Sign with custom Font
On top of the letter "B" should be a black square, if it was my texture. @SideOnly(Side.CLIENT) public class SovTileEntitySignRender extends TileEntitySpecialRenderer<TileEntitySovSign> { private static final ResourceLocation SIGN_TEXTURE = new ResourceLocation("soviet:textures/entity/walltile_1.png"); private final SovSignModel model = new SovSignModel(); Minecraft mc = Minecraft.getMinecraft(); public FontRenderer getFR() { FontRenderer fr = new FontRenderer(mc.gameSettings, new ResourceLocation("soviet:textures/font/soviet_font.png"), mc.renderEngine, true); return fr; } public void render(TileEntitySovSign te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) { Block block = te.getBlockType(); GlStateManager.pushMatrix(); float f = 0.6666667F; if (block == Blocks.STANDING_SIGN) { GlStateManager.translate((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); float f1 = (float)(te.getBlockMetadata() * 360) / 16.0F; GlStateManager.rotate(-f1, 0.0F, 1.0F, 0.0F); } else { int k = te.getBlockMetadata(); float f2 = 0.0F; if (k == 2) { f2 = 180.0F; } if (k == 4) { f2 = 90.0F; } if (k == 5) { f2 = -90.0F; } GlStateManager.translate((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); GlStateManager.rotate(-f2, 0.0F, 1.0F, 0.0F); GlStateManager.translate(0.0F, -0.3125F, -0.4375F); } if (destroyStage >= 0) { this.bindTexture(DESTROY_STAGES[destroyStage]); GlStateManager.matrixMode(5890); GlStateManager.pushMatrix(); GlStateManager.scale(4.0F, 2.0F, 1.0F); GlStateManager.translate(0.0625F, 0.0625F, 0.0625F); GlStateManager.matrixMode(5888); } else { this.bindTexture(SIGN_TEXTURE); } GlStateManager.enableRescaleNormal(); GlStateManager.pushMatrix(); GlStateManager.scale(0.6666667F, -0.6666667F, -0.6666667F); model.bone.render(0.0625F); model.bone2.render(0.0625F); GlStateManager.popMatrix(); FontRenderer fr = this.getFR(); float f3 = 0.010416667F; GlStateManager.translate(0.0F, 0.33333334F, 0.046666667F); GlStateManager.scale(0.010416667F, -0.010416667F, 0.010416667F); GlStateManager.glNormal3f(0.0F, 0.0F, -0.010416667F); GlStateManager.depthMask(false); int i = 0; if (destroyStage < 0) { for (int j = 0; j < te.signText.length; ++j) { if (te.signText[j] != null) { ITextComponent itextcomponent = te.signText[j]; List<ITextComponent> list = GuiUtilRenderComponents.splitText(itextcomponent, 40, fr, false, true); String s = list != null && !list.isEmpty() ? ((ITextComponent)list.get(0)).getFormattedText() : ""; if (j == te.lineBeingEdited) { s = "[" + s + "]"; fr.drawString(s, -fr.getStringWidth(s) / 2, j * 10 - te.signText.length * 8, 0); } else { fr.drawString(s, -fr.getStringWidth(s) / 2, j * 10 - te.signText.length * 8, 0xc90014); } } } } GlStateManager.depthMask(true); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.popMatrix(); if (destroyStage >= 0) { GlStateManager.matrixMode(5890); GlStateManager.popMatrix(); GlStateManager.matrixMode(5888); } } }
-
Custom Sign with custom Font
Understood, it was necessary to do this in the render. But for some reason it still does not load my picture
-
Custom Sign with custom Font
Thank you, I almost understood. When I create a new object like this: Minecraft mc = Minecraft.getMinecraft(); FontRenderer fr = new FontRenderer(mc.gameSettings, new ResourceLocation("soviet:textures/font/soviet_font.png"), mc.renderEngine, false); I get null in locationTexture in mc.renderEngine. This is strange, because the path is correct.
-
Custom Sign with custom Font
But I need my own font, and not the same as in vanilla. You said that I need to register Fontrenderer. How do I need to do this?
-
Custom Sign with custom Font
Well, the fonts are contained in the game as a png image. And processed by Fontrenderer.I mean, if I don't need to create my class Fontrenderer. So how can I register it correctly?
-
Custom Sign with custom Font
Thanks. And how do I properly register my picture with chars?
-
Custom Sign with custom Font
Hi. I'm making my sign. In General it is quite successful, I made it, but the only thing that I can't do it - I want to upload your own image with fonts. But why is it still loaded in vanilla. Do I need to register as my FontRenderer? If necessary, how to do it? My FontRenderer public class SovFontRenderer extends FontRenderer { public SovFontRenderer(GameSettings gameSettingsIn, ResourceLocation location, TextureManager textureManagerIn, boolean unicode) { super(gameSettingsIn, location, textureManagerIn, unicode); } } This is part code TESR GlStateManager.popMatrix(); Minecraft mc = Minecraft.getMinecraft(); SovFontRenderer fontrenderer = new SovFontRenderer(mc.gameSettings, new ResourceLocation("soviet:textures/font/soviet_font.png"), mc.renderEngine, true); float f3 = 0.010416667F; GlStateManager.translate(0.0F, 0.33333334F, 0.046666667F); GlStateManager.scale(0.010416667F, -0.010416667F, 0.010416667F); GlStateManager.glNormal3f(0.0F, 0.0F, -0.010416667F); GlStateManager.depthMask(false); int i = 0; if (destroyStage < 0) { for (int j = 0; j < te.signText.length; ++j) { if (te.signText[j] != null) { ITextComponent itextcomponent = te.signText[j]; List<ITextComponent> list = GuiUtilRenderComponents.splitText(itextcomponent, 90, fontrenderer, false, true); String s = list != null && !list.isEmpty() ? ((ITextComponent)list.get(0)).getFormattedText() : ""; if (j == te.lineBeingEdited) { s = "[" + s + "]"; fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, j * 10 - te.signText.length * 6, 0); } else { fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, j * 10 - te.signText.length * 6, 0); } } } } GlStateManager.depthMask(true); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.popMatrix();
-
AnimationTESR help for using!
I solved it. In my JSON there just wasn't enough points during the animation
-
AnimationTESR help for using!
I found a bug! I was looking at the wrong JSON file! But I have still nothing works, not moving. I understand AnimationTESR just makes blockstate change depending on time? Is the intermediate animation done automatically?
-
AnimationTESR help for using!
Thanks..Yes, everything is the same as everywhere. Here is a problem that for some reason writes to me when I put the block that clip "open" is not found though it exists. I don't understand why he can't find it. ?. So if I click on the block itself, "closing\opening", as the debug shows me in my TileEntity is working.
-
AnimationTESR help for using!
Do you know if I need a java entity model for this animation or not? You are a Forge developer, maybe you know)
-
AnimationTESR help for using!
I forgot to change the subject. I found a lot already on it. I have is the animation in AnimationTESR At the moment I have a lot ready, but the animation does not work and gives me an error: [01:02:57] [Client thread/ERROR] [FML]: Unable to find clip open in the model soviet:block/bigdoor_open however, this key point exists { "parameters": { "end_anim": [ "compose", [ "+", 1 ] , "#click_time" ], "trigger_anim": [ "-", "#end_anim" ], "progress": [ "-", "#click_time" ] }, "clips": { "closed": "#identity", "opening": [ "trigger_positive", [ "slerp", "#closed", "#open", "#identity", "#progress" ], "#trigger_anim", "!transition:open"], "open": [ "apply", "soviet:bigdoor@open", 0 ], "closing": [ "trigger_negative", [ "slerp", "#open", "#closed", "#identity", "#progress" ], "#trigger_anim", "!transition:closed"] }, "states": [ "closed", "opening", "open", "closing" ], "transitions": { "closed": "opening", "opening": "open", "open": "closing", "closing": "closed" }, "start_state": "closed" } I don't know what I'm missing. Do I need an entity model that is extends ModelBase?
-
AnimationTESR help for using!
Hello! In the model editor Blockbench found the ability to do animation with export to json file. Does anyone know how to attach it to the game? Version 1.12.2 { "format_version": "1.8.0", "animations": { "animation.model.new": { "loop": true, "animation_length": 3, "bones": { "bone": { "rotation": { "0.0": [0, 0, 0], "3.0": [0, -90, 0] }, "position": { "0.0": [0, 0, 0], "3.0": [5, 0, 7] } } } } } }
-
Custom Water. Darkening does not work
I tried, it doesn't work.
-
Custom Water. Darkening does not work
Hello. I did my fluid in the game, gave it a water material and added methods: public boolean isFullCube(IBlockState state) { return false; } public boolean isOpaqueCube(IBlockState state) { return false; } and in the constructor put blockrenderlayer public CustomWater(Fluid fluid, String name) { super(fluid, Material.WATER); setCreativeTab(Realism.tabRocks); setUnlocalizedName(name); setRegistryName(name); setRenderLayer(BlockRenderLayer.TRANSLUCENT); } But my liquid still doesn't dim the light like water. I did some research and found that BlockFluidRenderer involved only the vanilla BlockLiquid, but not the BlockFluidClassic class or others from which it is inherited. I looked through many pages in the search, but did not find a similar problem. What do you think about it?
-
The default spawn point in the custom world
Up! I can not solve this problem. Despite the fact that I'm trying to include my biome. It seems to be a mixture of two worlds: the ordinary and custom I can't imagine which class is to blame. But I'm pretty sure my WorldProvider should use my biome. Maybe I'm not registering the biome correctly? please look at this. And this class I call in CommonProxy#preInit
-
The default spawn point in the custom world
This world for some reason completely ignores my biome Insert other media
-
The default spawn point in the custom world
yes... If you mean change on ITeleporter
-
The default spawn point in the custom world
Sorry for misleading you. This is the old code, in fact there is now a RightClickBlock I think I've succeeded. Only that's why this world has exactly the same seed as overworld public class EventTeleport { @SubscribeEvent public void travel(PlayerInteractEvent.RightClickBlock e) { if(e.getEntityPlayer().getEntityWorld().getBlockState(e.getPos()) == Blocks.BEDROCK.getDefaultState()) { travelToDimensionWithoutPortal(e.getEntityPlayer(), 14, e.getEntityPlayer().getPosition().getX(), e.getEntityPlayer().getPosition().getY(), e.getEntityPlayer().getPosition().getZ()); } } public static void travelToDimensionWithoutPortal(Entity entity, int dimTo, double x, double y, double z) { if (dimTo == entity.dimension) entity.setPosition(x, y, z); if (entity instanceof EntityPlayerMP) { EntityPlayerMP player = (EntityPlayerMP) entity; WorldServer worldTo = player.mcServer.getWorld(dimTo); player.changeDimension(dimTo, new RealTeleporter(worldTo, x, y, z)); } } } teleporter public class RealTeleporter implements ITeleporter { WorldServer world; double x, y, z; public RealTeleporter(WorldServer ws, double x, double y, double z) { super(); world = ws; this.x = x; this.y = y; this.z = z; } @Override public void placeEntity(World world, Entity entity, float yaw) { entity.posX = this.x; entity.posY = this.y; entity.posZ = this.z; if (entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; if (player.capabilities.allowFlying) player.capabilities.isFlying = true; } } } And in this world there are vanilla biomes. Although I pointed out that need to my. public class RealismWorld extends WorldProvider { public RealismWorld() { this.biomeProvider = new BiomeProviderSingle(RegBiomes.MAGMATIC_BIOME); } @Override public DimensionType getDimensionType() { return RegWorlds.REALISM_WORLD; } @Override public IChunkGenerator createChunkGenerator() { return new RealismChunkGenerator(world, 1487574, true, "realism_settings"); } @Override public boolean canRespawnHere() { return true; } @Override public boolean isSurfaceWorld() { return false; } }
-
The default spawn point in the custom world
public class EventTeleport { @SubscribeEvent public void travel(PlayerInteractEvent.Clone e) { sendToDimensionWithoutPortal(e.getEntityPlayer(), 14, e.getEntityPlayer().getPosition().getX(), e.getEntityPlayer().getPosition().getY(), e.getEntityPlayer().getPosition().getZ()); } public static void sendToDimensionWithoutPortal(Entity entity, int dimTo, double x, double y, double z) { if (dimTo == entity.dimension) entity.setPosition(x, y, z); if (entity instanceof EntityPlayerMP) { EntityPlayerMP player = (EntityPlayerMP) entity; WorldServer worldTo = player.mcServer.getWorld(dimTo); player.mcServer.getPlayerList().transferPlayerToDimension(player, dimTo, new RealTeleporter(worldTo, x, y, z)); } } } and teleporter public class RealTeleporter extends Teleporter { WorldServer world; double x, y, z; public RealTeleporter(WorldServer worldIn, double x, double y, double z) { super(worldIn); world = worldIn; this.x = x; this.y = y; this.z = z; } @Override public boolean placeInExistingPortal(Entity entity, float rotationYaw) { entity.posX = this.x; entity.posY = this.y; entity.posZ = this.z; if (entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; if (player.capabilities.allowFlying) player.capabilities.isFlying = true; } return true; } }
-
The default spawn point in the custom world
My worldprovider
IPS spam blocked by CleanTalk.