Jump to content

[1.7.10]Render Bounding Box wierednes


Wuerfel_21

Recommended Posts

I have my TESR's rendering axises, which extend out of the block.

 

This is the code i use for a single axis: https://github.com/Wuerfel21/The-Derpy-Shiz-Mod/blob/master/src/main/java/net/wuerfel21/derpyshiz/entity/tile/AbstractGearbox.java#L41-L59

 

Now i tried adapting it for 2 axises: https://github.com/Wuerfel21/The-Derpy-Shiz-Mod/blob/master/src/main/java/net/wuerfel21/derpyshiz/entity/tile/TileEntityGearboxSplitting.java#L145-L181

 

but it seems to cover only the block itself...

Link to comment
Share on other sites

Hi

 

Try this

 

TileEntity::
/** Return an appropriate bounding box enclosing the TESR
 * This method is used to control whether the TESR should be rendered or not, depending on where the player is looking.
 * The default is the AABB for the parent block, which might be too small if the TESR renders outside the borders of the
 *   parent block.
 * If you get the boundary too small, the TESR may disappear when you aren't looking directly at it.
 * @return an appropriately size AABB for the TileEntity
 */
@SideOnly(Side.CLIENT)
@Override
public AxisAlignedBB getRenderBoundingBox()
{
	// if your render should always be performed regardless of where the player is looking, use infinite
	AxisAlignedBB infiniteExample = INFINITE_EXTENT_AABB;

	// our gem will stay above the block, up to 1 block higher, so our bounding box is from [x,y,z] to  [x+1, y+2, z+1]
	AxisAlignedBB aabb = new AxisAlignedBB(getPos(), getPos().add(1, 2, 1));
	return aabb;
}

 

(What I mean is - try it with an infinite box.  If that fixes your problem, your bounding box is wrong - try setting a breakpoint or System.out.println in there  to see why)

 

This link might also be of interest

https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe21_tileentityspecialrenderer

 

-TGG

 

 

Link to comment
Share on other sites

I already knew it was the bounding box, it was the only thing i changed.

 

So, again:

First metod works perfectly, but only accounts for 1 axis

Second method should do for 2 axises, but does only have the block itself in the bounding box, which is the problem

> try setting a breakpoint or System.out.println in there  to see why)

I guess you didn't try this suggestion?

 

eg

System.out.println("b1: " + b1);
System.out.println("b2:" + b2);
AxisAlignedBB retval = b1.func_111270_a(b2);
System.out.println("b1xb2:" + retval);
	return b1.func_111270_a(b2);

If you do this, you'll find out pretty quickly that your switches are busted.

 

-TGG

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Anyone have some time to lend me a bit of a helping hand, cuz I'm a lil stumped on why Chiseled Reborn is breaking the modpack. - All I get on the suspected mods area of the error log is this: Suspected Mods: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:250) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.processClass(MixinTransformationHandler.java:131) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.launch.MixinLaunchPluginLegacy.processClass(MixinLaunchPluginLegacy.java:131) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:156) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:88) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:50) at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:113) at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.lambda$findClass$15(ModuleClassLoader.java:219) at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:229) at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:219) at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:135) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) at java.base/java.lang.Class.getDeclaredMethods0(Native Method) at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402) at java.base/java.lang.Class.getDeclaredMethods(Class.java:2504) at TRANSFORMER/[email protected]+1.20.1/fudge.notenoughcrashes.stacktrace.ModIdentifier.findMixinMerged(ModIdentifier.java:133) at TRANSFORMER/[email protected]+1.20.1/fudge.notenoughcrashes.stacktrace.ModIdentifier.getMixinInfo(ModIdentifier.java:165) at TRANSFORMER/[email protected]+1.20.1/fudge.notenoughcrashes.stacktrace.ModIdentifier.identifyFromThrowable(ModIdentifier.java:64) at TRANSFORMER/[email protected]+1.20.1/fudge.notenoughcrashes.stacktrace.ModIdentifier.lambda$identifyFromStacktrace$2(ModIdentifier.java:42) at TRANSFORMER/[email protected]+1.20.1/fudge.notenoughcrashes.stacktrace.ModIdentifier.visitChildrenThrowables(ModIdentifier.java:52) at TRANSFORMER/[email protected]+1.20.1/fudge.notenoughcrashes.stacktrace.ModIdentifier.identifyFromStacktrace(ModIdentifier.java:41) at TRANSFORMER/[email protected]+1.20.1/fudge.notenoughcrashes.stacktrace.ModIdentifier.lambda$getSuspectedModsOf$0(ModIdentifier.java:34) at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1220) at TRANSFORMER/[email protected]+1.20.1/fudge.notenoughcrashes.stacktrace.ModIdentifier.getSuspectedModsOf(ModIdentifier.java:34) at TRANSFORMER/[email protected]/net.minecraft.CrashReport.md57ae67$lambda$beforeSystemDetailsAreWritten$1$0(CrashReport.java:535) at TRANSFORMER/[email protected]/net.minecraft.SystemReport.m_143522_(SystemReport.java:66) at TRANSFORMER/[email protected]/net.minecraft.CrashReport.handler$cpk000$beforeSystemDetailsAreWritten(CrashReport.java:533) at TRANSFORMER/[email protected]/net.minecraft.CrashReport.m_127519_(CrashReport.java:71) at TRANSFORMER/[email protected]/net.minecraft.CrashReport.m_127526_(CrashReport.java:114) at TRANSFORMER/[email protected]/net.minecraft.CrashReport.m_127512_(CrashReport.java:135) at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.m_91332_(Minecraft.java:846) at TRANSFORMER/[email protected]/net.minecraft.client.main.Main.main(Main.java:192) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:108) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:78) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [entity_texture_features-common.mixins.json:entity.misc.MixinBlockEntityRenderDispatcher] from phase [DEFAULT] in config [entity_texture_features-common.mixins.json] FAILED during APPLY at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:636) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinApplyError(MixinProcessor.java:588) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:379) ... 48 more Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: Specified index 4 for @ModifyArg is invalid for args (Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderer;Lnet/minecraft/world/level/block/entity/BlockEntity;FLcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;II), expected I on net/minecraft/client/renderer/blockentity/BlockEntityRenderDispatcher::etf$vanillaLightOverride [INJECT Applicator Phase -> entity_texture_features-common.mixins.json:entity.misc.MixinBlockEntityRenderDispatcher -> Apply Injections -> -> Inject -> entity_texture_features-common.mixins.json:entity.misc.MixinBlockEntityRenderDispatcher->@ModifyArg::etf$vanillaLightOverride(I)I] at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.invoke.ModifyArgInjector.findArgIndex(ModifyArgInjector.java:158) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.invoke.ModifyArgInjector.injectAtInvoke(ModifyArgInjector.java:113) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.invoke.InvokeInjector.inject(InvokeInjector.java:82) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.invoke.ModifyArgInjector.inject(ModifyArgInjector.java:103) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.code.Injector.inject(Injector.java:276) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.InjectionInfo.inject(InjectionInfo.java:445) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinTargetContext.applyInjections(MixinTargetContext.java:1355) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyInjections(MixinApplicatorStandard.java:1051) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:400) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:325) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:383) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:365) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ... 48 more I can't exactly narrow down what could be breaking it, maybe one of you can?
    • i need help fixing my server ui dont know what is going wrong here is the latest log help pls latestlog.txt
    • version: 1.19.2 launcher: Forge (43.2.14) Log: https://paste.ee/p/H3MCd#section0 getting an access violation error complaining about the create millstone, game will run fine for a little while, i'll load in, play about for 10-15 minutes and then it will crash without warning (launcher gives error code -1 if that helps) i'm stumped does anyone know what the issue is? if possible a solution that doesn't involve removing the create mod. thanks in advance.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.