From c90b1732e9e6c50332c2ff8ebfd7380d7f4ec174 Mon Sep 17 00:00:00 2001 From: cpw Date: Sat, 20 Jul 2019 21:04:00 -0400 Subject: [PATCH] Fix objloader registering at wrong time. Closes #5847. Added test class as suggested in the issue. Note: most tests are commented out at the present time, pending rework. Tests that work, work. Signed-off-by: cpw --- .../client/model/ModelLoaderRegistry.java | 2 +- .../fml/client/ClientModLoader.java | 2 + .../debug/block/FarmlandWaterTest.java | 4 +- .../debug/block/ParticleEffectsTest.java | 10 +- .../debug/block/PortalSpawnEventTest.java | 4 +- .../client/CustomTextureAtlasSpriteTest.java | 8 +- .../debug/client/FOVModifierEventTest.java | 8 +- .../client/SearchableCreativeTabTest.java | 4 +- .../gui/ContainerDrawForegroundEventTest.java | 4 +- .../client/gui/TooltipColorEventTest.java | 5 +- .../debug/client/model/AnimatedModelTest.java | 34 ++- .../model/ForgeBlockStatesLoaderTest.java | 10 +- .../client/model/ItemLayerModelTest.java | 4 +- .../client/model/ItemModelConflictTest.java | 4 +- .../client/model/ItemModelGenerationTest.java | 4 +- .../client/model/ModelBakeEventTest.java | 4 +- .../debug/client/model/ModelDataTest.java | 4 +- .../debug/client/model/ModelFluidTest.java | 4 +- .../client/model/ModelLoaderRegistryTest.java | 64 ++++-- .../client/model/MultiLayerModelTest.java | 4 +- .../rendering/FastTESRTransparentTest.java | 4 +- .../debug/client/rendering/ItemTESRTest.java | 4 +- .../rendering/VertexBufferNormalTest.java | 4 +- .../debug/entity/BlockEntityUpdateTest.java | 4 +- .../EntityTravelToDimensionEventTest.java | 4 +- .../entity/GetCollisionBoxesEventTest.java | 5 +- .../entity/ProjectileImpactEventTest.java | 4 +- .../entity/living/AnimalTameEventTest.java | 4 +- .../debug/entity/living/AttackEventTest.java | 4 +- .../living/BabyEntitySpawnEventTest.java | 4 +- .../entity/living/CheckSpawnEventTest.java | 4 +- .../living/CustomSpawnPlacementTest.java | 4 +- .../debug/entity/living/DamageEventTest.java | 4 +- .../living/EquipmentChangeEventTest.java | 10 +- .../entity/living/KnockBackEventTest.java | 5 +- .../entity/living/MobGriefingEventTest.java | 4 +- .../debug/entity/living/SpecialSpawnTest.java | 5 +- .../entity/living/VillagerProfessionTest.java | 4 +- .../entity/player/CriticalHitEventTest.java | 4 +- .../debug/entity/player/DamageReworkTest.java | 5 +- .../entity/player/ItemPickupEventTest.java | 4 +- .../player/PlayerInteractEventTest.java | 4 +- .../entity/player/PlayerSetSpawnTest.java | 4 +- .../player/ReachDistanceAttributeTest.java | 4 +- .../entity/player/SwimSpeedAttributeTest.java | 4 +- .../debug/fluid/ColoredFluidTest.java | 4 +- .../fluid/CreateFluidSourceEventTest.java | 4 +- .../debug/fluid/DynBucketTest.java | 4 +- .../debug/fluid/FluidPlaceBlockEventTest.java | 8 +- .../debug/fluid/FluidPlacementTest.java | 4 +- .../debug/fluid/ItemFluidHandlerTest.java | 4 +- .../debug/gameplay/AnytimeSleepingTest.java | 4 +- .../gameplay/BrewingRecipeRegistryTest.java | 4 +- .../debug/gameplay/ConstantLoadingTest.java | 4 +- .../debug/gameplay/CraftingSystemTest.java | 4 +- .../gameplay/DifficultyChangeEventTest.java | 5 +- .../debug/gameplay/DynamicBannerTest.java | 4 +- .../EnchantmentLevelSetEventTest.java | 4 +- .../FurnaceFuelBurnTimeEventTest.java | 4 +- .../debug/gameplay/GiveItemToPlayerTest.java | 8 +- .../debug/gameplay/InputUpdateEventTest.java | 4 +- .../debug/gameplay/NoBedSleepingTest.java | 4 +- .../debug/gameplay/PotionRegistryTest.java | 4 +- .../debug/gameplay/RecipeMatchingTest.java | 4 +- .../advancement/AdvancementCriterionTest.java | 4 +- .../advancement/AdvancementEventTest.java | 4 +- .../advancement/OredictTriggerTest.java | 18 +- .../gameplay/loot/LootContextTweaksTest.java | 4 +- .../gameplay/loot/LootTableLoadEventTest.java | 4 +- .../debug/gameplay/loot/LootTableTest.java | 4 +- .../debug/item/BonemealEventTest.java | 4 +- .../item/CanApplyAtEnchantingTableTest.java | 4 +- .../item/CanDestroyBlocksInCreativeTest.java | 4 +- .../debug/item/ContinuousUseItemTest.java | 4 +- .../debug/item/HorseArmorTest.java | 4 +- .../debug/item/IsBookEnchantableTest.java | 4 +- .../debug/item/ItemFishedEventTest.java | 4 +- .../debug/item/MapDataTest.java | 4 +- .../debug/item/MendingRepairTest.java | 5 +- .../debug/item/NBTShareTagTest.java | 4 +- .../debug/item/OnItemUseFirstTest.java | 5 +- .../debug/item/PotionCurabilityTest.java | 8 +- .../debug/item/PotionShouldRenderTest.java | 4 +- .../minecraftforge/debug/item/ShieldTest.java | 5 +- .../debug/misc/EnumPlantTypeTest.java | 4 +- .../debug/mod/CapabilityTest.java | 4 +- .../debug/mod/ClientLoadingExceptionTest.java | 4 +- .../debug/mod/ConfigAnnotationTest.java | 4 +- .../debug/mod/ObjectHolderAnnotationTest.java | 4 +- .../debug/mod/PermissionTest.java | 4 +- .../debug/mod/RegistryOverrideTest.java | 4 +- .../debug/network/BigNetworkMessageTest.java | 4 +- .../debug/network/TrackingTargetTest.java | 4 +- .../debug/util/ModNameTooltip.java | 4 +- .../debug/util/RotatingWrench.java | 4 +- .../debug/util/TextureDumper.java | 4 +- .../village/MerchantTradeOffersEventTest.java | 8 +- .../debug/village/VillageSiegeEventTest.java | 8 +- .../debug/world/ChunkCapabilityTest.java | 14 +- .../debug/world/ChunkWatchEventTest.java | 4 +- .../debug/world/DecorateEventDebug.java | 4 +- .../debug/world/SpawnDimensionTest.java | 4 +- .../debug/world/TileEntityLoadingTest.java | 4 +- .../debug/world/WorldCapabilityTest.java | 8 +- .../world/WorldProviderCanSleepAtTest.java | 4 +- .../registry/BlockStateMappingsTest.java | 8 +- .../registry/DummyBlockReplacementTest.java | 8 +- .../fml/common/registry/ForgeTestRunner.java | 26 ++- .../fml/common/registry/FreezingTests.java | 8 +- ...temBlockSubstitutionRemoveRestoreTest.java | 14 +- .../common/registry/RegistryTestSuite.java | 8 +- .../registry/SubstitutionInjectionTest.java | 8 +- .../SubstitutionRemoveRestoreTest.java | 14 +- .../common/registry/VanillaRegistryTests.java | 8 +- .../fml/debug/FaultyCoreMod.java | 4 +- .../fml/test/ForgeNetworkTestMod.java | 4 +- .../minecraftforge/fml/test/ModsTomlTest.java | 54 ----- .../fml/test/SpecialSpawnEventTest.java | 4 +- .../minecraftforge/fml/test/TestNetStuff.java | 196 ----------------- .../TestNetworkHandshake.java | 202 ------------------ .../fml/test/simplenet/SimpleNetHandler1.java | 33 --- .../fml/test/simplenet/SimpleNetHandler2.java | 33 --- .../test/simplenet/SimpleNetTestMessage1.java | 37 ---- .../test/simplenet/SimpleNetTestMessage2.java | 38 ---- .../fml/test/simplenet/SimpleNetTester.java | 41 ---- .../test/BiomeSpawnableListTest.java | 4 +- .../test/BufferBuilderExpansionTest.java | 4 +- .../test/ConfigurationTest.java | 4 +- .../minecraftforge/test/EnumHelperTest.java | 4 +- .../test/SelectorHandlerTest.java | 4 +- .../test/TestAnnotationParser.java | 4 +- .../minecraftforge/test/TestProgressBar.java | 4 +- .../testmods/TestOBJModelMod.java | 51 +++++ src/test/resources/META-INF/mods.toml | 28 +-- .../testobjmodelmod/models/sample_model.mtl | 3 + .../testobjmodelmod/models/sample_model.obj | 37 ++++ 136 files changed, 636 insertions(+), 848 deletions(-) delete mode 100644 src/test/java/net/minecraftforge/fml/test/ModsTomlTest.java delete mode 100644 src/test/java/net/minecraftforge/fml/test/TestNetStuff.java delete mode 100644 src/test/java/net/minecraftforge/fml/test/networkhandshake/TestNetworkHandshake.java delete mode 100644 src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetHandler1.java delete mode 100644 src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetHandler2.java delete mode 100644 src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetTestMessage1.java delete mode 100644 src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetTestMessage2.java delete mode 100644 src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetTester.java create mode 100644 src/test/java/net/minecraftforge/testmods/TestOBJModelMod.java create mode 100644 src/test/resources/assets/testobjmodelmod/models/sample_model.mtl create mode 100644 src/test/resources/assets/testobjmodelmod/models/sample_model.obj diff --git a/src/main/java/net/minecraftforge/client/model/ModelLoaderRegistry.java b/src/main/java/net/minecraftforge/client/model/ModelLoaderRegistry.java index cd20090188..59ea7335a1 100644 --- a/src/main/java/net/minecraftforge/client/model/ModelLoaderRegistry.java +++ b/src/main/java/net/minecraftforge/client/model/ModelLoaderRegistry.java @@ -63,7 +63,7 @@ public class ModelLoaderRegistry private static IResourceManager manager; // Forge built-in loaders - static + public static void init() { registerLoader(B3DLoader.INSTANCE); registerLoader(OBJLoader.INSTANCE); diff --git a/src/main/java/net/minecraftforge/fml/client/ClientModLoader.java b/src/main/java/net/minecraftforge/fml/client/ClientModLoader.java index 1323c8bf3e..64342129c9 100644 --- a/src/main/java/net/minecraftforge/fml/client/ClientModLoader.java +++ b/src/main/java/net/minecraftforge/fml/client/ClientModLoader.java @@ -27,6 +27,7 @@ import net.minecraft.resources.*; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.client.event.ModelRegistryEvent; +import net.minecraftforge.client.model.ModelLoaderRegistry; import net.minecraftforge.common.ForgeConfig; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.Event; @@ -68,6 +69,7 @@ public class ClientModLoader ResourcePackLoader.loadResourcePacks(defaultResourcePacks); mcResourceManager.addReloadListener(ClientModLoader::onreload); mcResourceManager.addReloadListener(BrandingControl.resourceManagerReloadListener()); + ModelLoaderRegistry.init(); } private static CompletableFuture onreload(final IFutureReloadListener.IStage stage, final IResourceManager resourceManager, final IProfiler prepareProfiler, final IProfiler executeProfiler, final Executor asyncExecutor, final Executor syncExecutor) { diff --git a/src/test/java/net/minecraftforge/debug/block/FarmlandWaterTest.java b/src/test/java/net/minecraftforge/debug/block/FarmlandWaterTest.java index 40d3da7065..6245690f57 100644 --- a/src/test/java/net/minecraftforge/debug/block/FarmlandWaterTest.java +++ b/src/test/java/net/minecraftforge/debug/block/FarmlandWaterTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.block; @@ -185,3 +186,4 @@ public class FarmlandWaterTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/block/ParticleEffectsTest.java b/src/test/java/net/minecraftforge/debug/block/ParticleEffectsTest.java index b3d56f4088..a6e51c1aad 100644 --- a/src/test/java/net/minecraftforge/debug/block/ParticleEffectsTest.java +++ b/src/test/java/net/minecraftforge/debug/block/ParticleEffectsTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.block; @@ -110,7 +111,8 @@ public class ParticleEffectsTest event.getRegistry().register(item.setRegistryName(particleBlockLocation)); } - /* + */ +/* @EventBusSubscriber(value = Dist.CLIENT, modid = MOD_ID) public static class ClientEventHandler { @@ -131,5 +133,7 @@ public class ParticleEffectsTest ModelLoader.setCustomModelResourceLocation(PARTICLE_ITEM, 0, invLoc); } } - */ + *//* + } +*/ diff --git a/src/test/java/net/minecraftforge/debug/block/PortalSpawnEventTest.java b/src/test/java/net/minecraftforge/debug/block/PortalSpawnEventTest.java index 66a479335d..2e7b228080 100644 --- a/src/test/java/net/minecraftforge/debug/block/PortalSpawnEventTest.java +++ b/src/test/java/net/minecraftforge/debug/block/PortalSpawnEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.block; @@ -38,3 +39,4 @@ public class PortalSpawnEventTest event.setCanceled(true); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/CustomTextureAtlasSpriteTest.java b/src/test/java/net/minecraftforge/debug/client/CustomTextureAtlasSpriteTest.java index 749ef17081..ebed309fc2 100644 --- a/src/test/java/net/minecraftforge/debug/client/CustomTextureAtlasSpriteTest.java +++ b/src/test/java/net/minecraftforge/debug/client/CustomTextureAtlasSpriteTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client; @@ -40,9 +41,11 @@ import javax.annotation.Nonnull; import java.util.Collection; import java.util.function.Function; +*/ /** * Test for {@link TextureStitchEvent.Pre}. - */ + *//* + //@Mod(modid = CustomTextureAtlasSpriteTest.MOD_ID, name = CustomTextureAtlasSpriteTest.NAME, version = "1.0", clientSideOnly = true) public class CustomTextureAtlasSpriteTest { @@ -124,3 +127,4 @@ public class CustomTextureAtlasSpriteTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/FOVModifierEventTest.java b/src/test/java/net/minecraftforge/debug/client/FOVModifierEventTest.java index 64047c616d..5e146c3a2a 100644 --- a/src/test/java/net/minecraftforge/debug/client/FOVModifierEventTest.java +++ b/src/test/java/net/minecraftforge/debug/client/FOVModifierEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client; @@ -27,9 +28,11 @@ import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.event.FMLInitializationEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; +*/ /** * Simple mod to test fov modifier. - */ + *//* + //@Mod(modid = "fovmodifiertest", name = "FOV Modifier Test", version = "0.0.0", clientSideOnly = true) public class FOVModifierEventTest { @@ -53,3 +56,4 @@ public class FOVModifierEventTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/SearchableCreativeTabTest.java b/src/test/java/net/minecraftforge/debug/client/SearchableCreativeTabTest.java index c25faa955a..43d3be1118 100644 --- a/src/test/java/net/minecraftforge/debug/client/SearchableCreativeTabTest.java +++ b/src/test/java/net/minecraftforge/debug/client/SearchableCreativeTabTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client; @@ -60,3 +61,4 @@ public class SearchableCreativeTabTest } }; } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/gui/ContainerDrawForegroundEventTest.java b/src/test/java/net/minecraftforge/debug/client/gui/ContainerDrawForegroundEventTest.java index c105cb7b87..d5dde5a7d0 100644 --- a/src/test/java/net/minecraftforge/debug/client/gui/ContainerDrawForegroundEventTest.java +++ b/src/test/java/net/minecraftforge/debug/client/gui/ContainerDrawForegroundEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client.gui; @@ -58,3 +59,4 @@ public class ContainerDrawForegroundEventTest } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/gui/TooltipColorEventTest.java b/src/test/java/net/minecraftforge/debug/client/gui/TooltipColorEventTest.java index 0cbc15e11f..ec5baab0b3 100644 --- a/src/test/java/net/minecraftforge/debug/client/gui/TooltipColorEventTest.java +++ b/src/test/java/net/minecraftforge/debug/client/gui/TooltipColorEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client.gui; @@ -53,4 +54,4 @@ public class TooltipColorEventTest event.setBorderEnd(0xF03f0f0f); } } -} \ No newline at end of file +}*/ diff --git a/src/test/java/net/minecraftforge/debug/client/model/AnimatedModelTest.java b/src/test/java/net/minecraftforge/debug/client/model/AnimatedModelTest.java index 7c85b3c45d..bef383b99f 100644 --- a/src/test/java/net/minecraftforge/debug/client/model/AnimatedModelTest.java +++ b/src/test/java/net/minecraftforge/debug/client/model/AnimatedModelTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client.model; @@ -178,7 +179,8 @@ public class AnimatedModelTest return state.withProperty(Properties.StaticProperty, true); } - /*@Override + */ +/*@Override public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) { TileEntity te = world.getTileEntity(pos); if(te instanceof Chest && state instanceof IExtendedBlockState) @@ -186,7 +188,8 @@ public class AnimatedModelTest return ((Chest)te).getState((IExtendedBlockState)state); } return super.getExtendedState(state, world, pos); - }*/ + }*//* + @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) @@ -315,7 +318,8 @@ public class AnimatedModelTest @SuppressWarnings("deprecation") public Render createRenderFor(RenderManager manager) { - /*model = ModelLoaderRegistry.getModel(new ResourceLocation(ModelLoaderRegistryTest.MODID, "block/chest.b3d")); + */ +/*model = ModelLoaderRegistry.getModel(new ResourceLocation(ModelLoaderRegistryTest.MODID, "block/chest.b3d")); if(model instanceof IRetexturableModel) { model = ((IRetexturableModel)model).retexture(ImmutableMap.of("#chest", "entity/chest/normal")); @@ -323,7 +327,8 @@ public class AnimatedModelTest if(model instanceof IModelCustomData) { model = ((IModelCustomData)model).process(ImmutableMap.of("mesh", "[\"Base\", \"Lid\"]")); - }*/ + }*//* + ResourceLocation location = new ModelResourceLocation(new ResourceLocation(MODID, blockName), "entity"); return new RenderLiving(manager, new net.minecraftforge.client.model.animation.AnimationModelBase(location, new VertexLighterSmoothAo(Minecraft.getMinecraft().getBlockColors())) { @@ -420,9 +425,11 @@ public class AnimatedModelTest public Chest() { - /*asm = proxy.load(new ResourceLocation(MODID.toLowerCase(), "asms/block/chest.json"), ImmutableMap.of( + */ +/*asm = proxy.load(new ResourceLocation(MODID.toLowerCase(), "asms/block/chest.json"), ImmutableMap.of( "click_time", clickTime - ));*/ + ));*//* + asm = proxy.load(new ResourceLocation(MODID.toLowerCase(), "asms/block/engine.json"), ImmutableMap.of( "cycle_length", cycleLength, "click_time", clickTime @@ -444,9 +451,11 @@ public class AnimatedModelTest return true; } - /*public IExtendedBlockState getState(IExtendedBlockState state) { + */ +/*public IExtendedBlockState getState(IExtendedBlockState state) { return state.withProperty(B3DFrameProperty.instance, curState); - }*/ + }*//* + public void click(boolean sneaking) { @@ -456,7 +465,8 @@ public class AnimatedModelTest { cycleLength.setValue(6 - cycleLength.apply(0)); } - /*else if(asm.currentState().equals("closed")) + */ +/*else if(asm.currentState().equals("closed")) { clickTime.setValue(Animation.getWorldTime(getWorld())); asm.transition("opening"); @@ -465,7 +475,8 @@ public class AnimatedModelTest { clickTime.setValue(Animation.getWorldTime(getWorld())); asm.transition("closing"); - }*/ + }*//* + else if (asm.currentState().equals("default")) { float time = Animation.getWorldTime(getWorld(), Animation.getPartialTickTime()); @@ -563,3 +574,4 @@ public class AnimatedModelTest } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/model/ForgeBlockStatesLoaderTest.java b/src/test/java/net/minecraftforge/debug/client/model/ForgeBlockStatesLoaderTest.java index 6159caa535..d9da436b69 100644 --- a/src/test/java/net/minecraftforge/debug/client/model/ForgeBlockStatesLoaderTest.java +++ b/src/test/java/net/minecraftforge/debug/client/model/ForgeBlockStatesLoaderTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client.model; @@ -116,7 +117,8 @@ public class ForgeBlockStatesLoaderTest // this block is never actually used, it's only needed for the error message on load to see the variant it maps to // disabling until we can make it a proper test - /*public static class CustomMappedBlock extends Block + */ +/*public static class CustomMappedBlock extends Block { public static final PropertyEnum VARIANT = PropertyEnum.create("type", CustomVariant.class); @@ -152,5 +154,7 @@ public class ForgeBlockStatesLoaderTest public String getName() { return this.toString(); }; } - }*/ + }*//* + } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/model/ItemLayerModelTest.java b/src/test/java/net/minecraftforge/debug/client/model/ItemLayerModelTest.java index 8d03bd3369..8a883f4d9c 100644 --- a/src/test/java/net/minecraftforge/debug/client/model/ItemLayerModelTest.java +++ b/src/test/java/net/minecraftforge/debug/client/model/ItemLayerModelTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client.model; @@ -118,3 +119,4 @@ public class ItemLayerModelTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/model/ItemModelConflictTest.java b/src/test/java/net/minecraftforge/debug/client/model/ItemModelConflictTest.java index b9142f46d2..5aae869ffa 100644 --- a/src/test/java/net/minecraftforge/debug/client/model/ItemModelConflictTest.java +++ b/src/test/java/net/minecraftforge/debug/client/model/ItemModelConflictTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client.model; @@ -80,3 +81,4 @@ public class ItemModelConflictTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/model/ItemModelGenerationTest.java b/src/test/java/net/minecraftforge/debug/client/model/ItemModelGenerationTest.java index a1387750f9..fa6aef01e4 100644 --- a/src/test/java/net/minecraftforge/debug/client/model/ItemModelGenerationTest.java +++ b/src/test/java/net/minecraftforge/debug/client/model/ItemModelGenerationTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client.model; @@ -97,3 +98,4 @@ public class ItemModelGenerationTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/model/ModelBakeEventTest.java b/src/test/java/net/minecraftforge/debug/client/model/ModelBakeEventTest.java index 6f9e5962e7..2c32560813 100644 --- a/src/test/java/net/minecraftforge/debug/client/model/ModelBakeEventTest.java +++ b/src/test/java/net/minecraftforge/debug/client/model/ModelBakeEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client.model; @@ -388,3 +389,4 @@ public class ModelBakeEventTest throw new IllegalArgumentException("Unknown Side " + side); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/model/ModelDataTest.java b/src/test/java/net/minecraftforge/debug/client/model/ModelDataTest.java index 39b661c364..b2522da1d6 100644 --- a/src/test/java/net/minecraftforge/debug/client/model/ModelDataTest.java +++ b/src/test/java/net/minecraftforge/debug/client/model/ModelDataTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client.model; @@ -187,3 +188,4 @@ public class ModelDataTest event.getRegistry().register(TileEntityType.Builder.func_223042_a(Tile::new, MY_BLOCK).build(null).setRegistryName(MODID, BLOCK_NAME)); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/model/ModelFluidTest.java b/src/test/java/net/minecraftforge/debug/client/model/ModelFluidTest.java index c35935f07c..6286f126f2 100644 --- a/src/test/java/net/minecraftforge/debug/client/model/ModelFluidTest.java +++ b/src/test/java/net/minecraftforge/debug/client/model/ModelFluidTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client.model; @@ -217,3 +218,4 @@ public class ModelFluidTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/model/ModelLoaderRegistryTest.java b/src/test/java/net/minecraftforge/debug/client/model/ModelLoaderRegistryTest.java index 0ed46cfd40..b9d99a2fb7 100644 --- a/src/test/java/net/minecraftforge/debug/client/model/ModelLoaderRegistryTest.java +++ b/src/test/java/net/minecraftforge/debug/client/model/ModelLoaderRegistryTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client.model; @@ -228,6 +229,7 @@ public class ModelLoaderRegistryTest return this.getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite()); } +*/ /* @Override public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) { @@ -235,7 +237,8 @@ public class ModelLoaderRegistryTest B3DLoader.B3DState newState = new B3DLoader.B3DState(null, counter); return ((IExtendedBlockState) state).withProperty(Properties.AnimationProperty, newState); } -*/ +*//* + @Override public boolean onBlockActivated(IBlockState state, World world, BlockPos pos, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { @@ -263,7 +266,8 @@ public class ModelLoaderRegistryTest } } - /** + */ +/** * This block is intended to demonstrate how to change the visibility of a group(s) * from within the block's class. * By right clicking on this block the player increments an integer value in the tile entity @@ -273,7 +277,8 @@ public class ModelLoaderRegistryTest * Holding shift decrements the value in the tile entity. * @author shadekiller666 * - */ + *//* + public static class OBJTesseractBlock extends Block { public static final String name = "obj_tesseract_block"; @@ -342,6 +347,7 @@ public class ModelLoaderRegistryTest return true; } +*/ /* @Override public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) { @@ -351,7 +357,8 @@ public class ModelLoaderRegistryTest return ((IExtendedBlockState) state).withProperty(Properties.AnimationProperty, te.state); } return state; - }*/ + }*//* + } public static class OBJTesseractTileEntity extends TileEntity @@ -427,7 +434,8 @@ public class ModelLoaderRegistryTest } } - /** + */ +/** * This block demonstrates how to utilize the vertex coloring feature * of the OBJ loader. See 'vertex_coloring.obj' and 'vertex_coloring.mtl' in * 'test/resources/assets/forgedebugmodelloaderregistry/models/block/', to properly @@ -436,7 +444,8 @@ public class ModelLoaderRegistryTest * color instead of each vertex. * @author shadekiller666 * - */ + *//* + public static class OBJVertexColoring1 extends Block { public static final String name = "obj_vertex_coloring1"; @@ -466,14 +475,16 @@ public class ModelLoaderRegistryTest } } - /** + */ +/** * This block demonstrates how to use IProperties and IUnlistedProperties together * in the same ExtendedBlockState. Similar to pistons, this block will face the player * when placed. Unlike pistons, however; this block's model is an eyeball, because * the OBJ loader can load spheres. * @author shadekiller666 * - */ + *//* + public static class OBJDirectionEye extends Block { public static final DirectionProperty FACING = BlockStateProperties.FACING; @@ -517,13 +528,15 @@ public class ModelLoaderRegistryTest } } - /** + */ +/** * This block uses the same model as CustomModelBlock3 does, but * this class allows the player to cycle the colors of each vertex to black * and then back to the original color when right clicking on the block. * @author shadekiller666 * - */ + *//* + public static class OBJVertexColoring2 extends Block { public static final String name = "obj_vertex_coloring2"; @@ -576,7 +589,8 @@ public class ModelLoaderRegistryTest if (this.world.isRemote) { logger.info(shouldIncrement); - /* + */ +/* IBakedModel bakedModel = Minecraft.getMinecraft().getBlockRendererDispatcher().getModelFromBlockState(this.world.getBlockState(this.pos), this.world, this.pos); if (bakedModel != null && bakedModel instanceof OBJBakedModel) { @@ -621,16 +635,19 @@ public class ModelLoaderRegistryTest } } this.world.markBlockRangeForRenderUpdate(this.pos, this.pos); - }*/ + }*//* + } } } - /** + */ +/** * This block is a debug block that faces the player when placed, like a piston. * @author shadekiller666 * - */ + *//* + public static class OBJDirectionBlock extends Block { public static final DirectionProperty FACING = BlockStateProperties.FACING; @@ -674,12 +691,14 @@ public class ModelLoaderRegistryTest } } - /** + */ +/** * This block is a testing block that will be used to test the use * of "custom" data defined in a forge blockstate json. WIP, ignore for now. * @author shadekiller666 * - */ + *//* + public static class OBJCustomDataBlock extends Block { public static final BooleanProperty NORTH = BooleanProperty.create("north"); @@ -726,12 +745,14 @@ public class ModelLoaderRegistryTest } } - /** + */ +/** * This block uses the same model as CustomModelBlock4, but instead of facing the * player when placed, this one ALWAYS faces the player. I know, creepy right? * @author shadekiller666 * - */ + *//* + public static class OBJDynamicEye extends Block { public static final String name = "obj_dynamic_eye"; @@ -766,6 +787,7 @@ public class ModelLoaderRegistryTest return true; } +*/ /* @Override public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) { @@ -778,7 +800,8 @@ public class ModelLoaderRegistryTest } } return state; - }*/ + }*//* + } public static class OBJDynamicEyeTileEntity extends TileEntity implements ITickable @@ -822,3 +845,4 @@ public class ModelLoaderRegistryTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/model/MultiLayerModelTest.java b/src/test/java/net/minecraftforge/debug/client/model/MultiLayerModelTest.java index 9b83165843..92826ddb71 100644 --- a/src/test/java/net/minecraftforge/debug/client/model/MultiLayerModelTest.java +++ b/src/test/java/net/minecraftforge/debug/client/model/MultiLayerModelTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client.model; @@ -100,3 +101,4 @@ public class MultiLayerModelTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/rendering/FastTESRTransparentTest.java b/src/test/java/net/minecraftforge/debug/client/rendering/FastTESRTransparentTest.java index 1f7e0d0515..b9a1892686 100644 --- a/src/test/java/net/minecraftforge/debug/client/rendering/FastTESRTransparentTest.java +++ b/src/test/java/net/minecraftforge/debug/client/rendering/FastTESRTransparentTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client.rendering; @@ -265,3 +266,4 @@ public class FastTESRTransparentTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/rendering/ItemTESRTest.java b/src/test/java/net/minecraftforge/debug/client/rendering/ItemTESRTest.java index 8a3eaed779..05c84cc351 100644 --- a/src/test/java/net/minecraftforge/debug/client/rendering/ItemTESRTest.java +++ b/src/test/java/net/minecraftforge/debug/client/rendering/ItemTESRTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client.rendering; @@ -161,3 +162,4 @@ public class ItemTESRTest { } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/client/rendering/VertexBufferNormalTest.java b/src/test/java/net/minecraftforge/debug/client/rendering/VertexBufferNormalTest.java index 05736d557e..95e8e6289c 100644 --- a/src/test/java/net/minecraftforge/debug/client/rendering/VertexBufferNormalTest.java +++ b/src/test/java/net/minecraftforge/debug/client/rendering/VertexBufferNormalTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.client.rendering; @@ -112,3 +113,4 @@ public class VertexBufferNormalTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/BlockEntityUpdateTest.java b/src/test/java/net/minecraftforge/debug/entity/BlockEntityUpdateTest.java index f3aa2b88b1..45a1ddd443 100644 --- a/src/test/java/net/minecraftforge/debug/entity/BlockEntityUpdateTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/BlockEntityUpdateTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity; @@ -70,3 +71,4 @@ public class BlockEntityUpdateTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/EntityTravelToDimensionEventTest.java b/src/test/java/net/minecraftforge/debug/entity/EntityTravelToDimensionEventTest.java index f24bd85ce8..af44e08fb5 100644 --- a/src/test/java/net/minecraftforge/debug/entity/EntityTravelToDimensionEventTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/EntityTravelToDimensionEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity; @@ -53,3 +54,4 @@ public class EntityTravelToDimensionEventTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/GetCollisionBoxesEventTest.java b/src/test/java/net/minecraftforge/debug/entity/GetCollisionBoxesEventTest.java index d726dd4ef2..970658137b 100644 --- a/src/test/java/net/minecraftforge/debug/entity/GetCollisionBoxesEventTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/GetCollisionBoxesEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity; @@ -117,4 +118,4 @@ public class GetCollisionBoxesEventTest } } -} \ No newline at end of file +}*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/ProjectileImpactEventTest.java b/src/test/java/net/minecraftforge/debug/entity/ProjectileImpactEventTest.java index 1ffe48d648..9feebc4a9d 100644 --- a/src/test/java/net/minecraftforge/debug/entity/ProjectileImpactEventTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/ProjectileImpactEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity; @@ -49,3 +50,4 @@ public class ProjectileImpactEventTest logger.info("projectile: {}, impact: {}", event.getEntity().getName(), event.getRayTraceResult()); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/living/AnimalTameEventTest.java b/src/test/java/net/minecraftforge/debug/entity/living/AnimalTameEventTest.java index 4c80830999..9ba88391f2 100644 --- a/src/test/java/net/minecraftforge/debug/entity/living/AnimalTameEventTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/living/AnimalTameEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.living; @@ -45,3 +46,4 @@ public class AnimalTameEventTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/living/AttackEventTest.java b/src/test/java/net/minecraftforge/debug/entity/living/AttackEventTest.java index cb7ffefd58..1501c908bf 100644 --- a/src/test/java/net/minecraftforge/debug/entity/living/AttackEventTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/living/AttackEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.living; @@ -50,3 +51,4 @@ public class AttackEventTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/living/BabyEntitySpawnEventTest.java b/src/test/java/net/minecraftforge/debug/entity/living/BabyEntitySpawnEventTest.java index 7053d4a28e..0d430b1453 100644 --- a/src/test/java/net/minecraftforge/debug/entity/living/BabyEntitySpawnEventTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/living/BabyEntitySpawnEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.living; @@ -47,3 +48,4 @@ public class BabyEntitySpawnEventTest event.setChild(new EntityCow(event.getParentA().world)); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/living/CheckSpawnEventTest.java b/src/test/java/net/minecraftforge/debug/entity/living/CheckSpawnEventTest.java index f775a12b23..482bb5138e 100644 --- a/src/test/java/net/minecraftforge/debug/entity/living/CheckSpawnEventTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/living/CheckSpawnEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.living; @@ -48,3 +49,4 @@ public class CheckSpawnEventTest event.setResult(Result.DENY); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/living/CustomSpawnPlacementTest.java b/src/test/java/net/minecraftforge/debug/entity/living/CustomSpawnPlacementTest.java index 58e3179685..48738e0176 100644 --- a/src/test/java/net/minecraftforge/debug/entity/living/CustomSpawnPlacementTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/living/CustomSpawnPlacementTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.living; @@ -44,3 +45,4 @@ public class CustomSpawnPlacementTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/living/DamageEventTest.java b/src/test/java/net/minecraftforge/debug/entity/living/DamageEventTest.java index 36d1ecf38c..c07af92f6c 100644 --- a/src/test/java/net/minecraftforge/debug/entity/living/DamageEventTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/living/DamageEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.living; @@ -169,3 +170,4 @@ public class DamageEventTest } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/living/EquipmentChangeEventTest.java b/src/test/java/net/minecraftforge/debug/entity/living/EquipmentChangeEventTest.java index 084d84cf57..c75d2289f8 100644 --- a/src/test/java/net/minecraftforge/debug/entity/living/EquipmentChangeEventTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/living/EquipmentChangeEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.living; @@ -42,10 +43,12 @@ public class EquipmentChangeEventTest } } - /** + */ +/** * the Method handling the {@link LivingEquipmentChangeEvent} * Serverside only! - */ + *//* + @SubscribeEvent public void onEquipmentChange(LivingEquipmentChangeEvent event) { @@ -54,3 +57,4 @@ public class EquipmentChangeEventTest } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/living/KnockBackEventTest.java b/src/test/java/net/minecraftforge/debug/entity/living/KnockBackEventTest.java index 3d10942e8d..f304542587 100644 --- a/src/test/java/net/minecraftforge/debug/entity/living/KnockBackEventTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/living/KnockBackEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.living; @@ -46,4 +47,4 @@ public class KnockBackEventTest } } } -} \ No newline at end of file +}*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/living/MobGriefingEventTest.java b/src/test/java/net/minecraftforge/debug/entity/living/MobGriefingEventTest.java index ba90f50bfc..a68f21fdd5 100644 --- a/src/test/java/net/minecraftforge/debug/entity/living/MobGriefingEventTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/living/MobGriefingEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.living; @@ -49,3 +50,4 @@ public class MobGriefingEventTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/living/SpecialSpawnTest.java b/src/test/java/net/minecraftforge/debug/entity/living/SpecialSpawnTest.java index 99b0754483..e53bd9985c 100644 --- a/src/test/java/net/minecraftforge/debug/entity/living/SpecialSpawnTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/living/SpecialSpawnTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.living; @@ -44,4 +45,4 @@ public class SpecialSpawnTest event.getEntity().setCustomNameTag("Called SpecialSpawn"); } } -} \ No newline at end of file +}*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/living/VillagerProfessionTest.java b/src/test/java/net/minecraftforge/debug/entity/living/VillagerProfessionTest.java index 96a3135b8a..fcb949aad3 100644 --- a/src/test/java/net/minecraftforge/debug/entity/living/VillagerProfessionTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/living/VillagerProfessionTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.living; @@ -38,3 +39,4 @@ public class VillagerProfessionTest event.getRegistry().register(profession); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/player/CriticalHitEventTest.java b/src/test/java/net/minecraftforge/debug/entity/player/CriticalHitEventTest.java index af85bbe15c..85e201abf6 100644 --- a/src/test/java/net/minecraftforge/debug/entity/player/CriticalHitEventTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/player/CriticalHitEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.player; @@ -86,3 +87,4 @@ public class CriticalHitEventTest log.info("The damagemodifier is changed to {}", event.getDamageModifier()); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/player/DamageReworkTest.java b/src/test/java/net/minecraftforge/debug/entity/player/DamageReworkTest.java index 52ab4102e7..7a0f3b699f 100644 --- a/src/test/java/net/minecraftforge/debug/entity/player/DamageReworkTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/player/DamageReworkTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.player; @@ -63,4 +64,4 @@ public class DamageReworkTest } } } -} \ No newline at end of file +}*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/player/ItemPickupEventTest.java b/src/test/java/net/minecraftforge/debug/entity/player/ItemPickupEventTest.java index d629390ffd..41fc326cc3 100644 --- a/src/test/java/net/minecraftforge/debug/entity/player/ItemPickupEventTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/player/ItemPickupEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.player; @@ -54,3 +55,4 @@ public class ItemPickupEventTest logger.info("Item picked up: " + event.getStack().getDisplayName() + "x" + event.getStack().getCount()); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/player/PlayerInteractEventTest.java b/src/test/java/net/minecraftforge/debug/entity/player/PlayerInteractEventTest.java index a3083fe73d..23bc1ffc1e 100644 --- a/src/test/java/net/minecraftforge/debug/entity/player/PlayerInteractEventTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/player/PlayerInteractEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.player; @@ -248,3 +249,4 @@ public class PlayerInteractEventTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/player/PlayerSetSpawnTest.java b/src/test/java/net/minecraftforge/debug/entity/player/PlayerSetSpawnTest.java index f518724dd2..92d9451ab7 100644 --- a/src/test/java/net/minecraftforge/debug/entity/player/PlayerSetSpawnTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/player/PlayerSetSpawnTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.player; @@ -50,3 +51,4 @@ public class PlayerSetSpawnTest event.setCanceled(true); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/player/ReachDistanceAttributeTest.java b/src/test/java/net/minecraftforge/debug/entity/player/ReachDistanceAttributeTest.java index 2b192ba2d5..5bc32fe164 100644 --- a/src/test/java/net/minecraftforge/debug/entity/player/ReachDistanceAttributeTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/player/ReachDistanceAttributeTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.player; @@ -78,3 +79,4 @@ public class ReachDistanceAttributeTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/entity/player/SwimSpeedAttributeTest.java b/src/test/java/net/minecraftforge/debug/entity/player/SwimSpeedAttributeTest.java index ac1723de84..58997783a8 100644 --- a/src/test/java/net/minecraftforge/debug/entity/player/SwimSpeedAttributeTest.java +++ b/src/test/java/net/minecraftforge/debug/entity/player/SwimSpeedAttributeTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.entity.player; @@ -78,3 +79,4 @@ public class SwimSpeedAttributeTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/fluid/ColoredFluidTest.java b/src/test/java/net/minecraftforge/debug/fluid/ColoredFluidTest.java index 601b386b9e..fb5bd1671a 100644 --- a/src/test/java/net/minecraftforge/debug/fluid/ColoredFluidTest.java +++ b/src/test/java/net/minecraftforge/debug/fluid/ColoredFluidTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.fluid; @@ -73,3 +74,4 @@ public class ColoredFluidTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/fluid/CreateFluidSourceEventTest.java b/src/test/java/net/minecraftforge/debug/fluid/CreateFluidSourceEventTest.java index 535a9e285d..e53b028bf2 100644 --- a/src/test/java/net/minecraftforge/debug/fluid/CreateFluidSourceEventTest.java +++ b/src/test/java/net/minecraftforge/debug/fluid/CreateFluidSourceEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.fluid; @@ -55,3 +56,4 @@ public class CreateFluidSourceEventTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/fluid/DynBucketTest.java b/src/test/java/net/minecraftforge/debug/fluid/DynBucketTest.java index 28f5373068..f62fc6a579 100644 --- a/src/test/java/net/minecraftforge/debug/fluid/DynBucketTest.java +++ b/src/test/java/net/minecraftforge/debug/fluid/DynBucketTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.fluid; @@ -380,3 +381,4 @@ public class DynBucketTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/fluid/FluidPlaceBlockEventTest.java b/src/test/java/net/minecraftforge/debug/fluid/FluidPlaceBlockEventTest.java index ab4b96417b..18afb59de9 100644 --- a/src/test/java/net/minecraftforge/debug/fluid/FluidPlaceBlockEventTest.java +++ b/src/test/java/net/minecraftforge/debug/fluid/FluidPlaceBlockEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.fluid; @@ -29,13 +30,15 @@ import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +*/ /** * This test will: * - Cause lava to turn into gold when touched by water. * - Replace the result of a cobblestone generator with granite. * - Replace the result of a stone generator with either diamond, or emerald when in a biome where emerald spawns naturally. * - Prevent lava from setting surrounding blocks on fire. - */ + *//* + //@Mod(modid = "fluidplaceblocktest", name = "FluidPlaceBlockTest", version = "0.0.0", acceptableRemoteVersions = "*") public class FluidPlaceBlockEventTest { @@ -62,3 +65,4 @@ public class FluidPlaceBlockEventTest if (event.getState().getBlock() == Blocks.FIRE) event.setNewState(event.getOriginalState()); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/fluid/FluidPlacementTest.java b/src/test/java/net/minecraftforge/debug/fluid/FluidPlacementTest.java index 863db62fa8..a3277982af 100644 --- a/src/test/java/net/minecraftforge/debug/fluid/FluidPlacementTest.java +++ b/src/test/java/net/minecraftforge/debug/fluid/FluidPlacementTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.fluid; @@ -318,3 +319,4 @@ public class FluidPlacementTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/fluid/ItemFluidHandlerTest.java b/src/test/java/net/minecraftforge/debug/fluid/ItemFluidHandlerTest.java index 3ec933307e..5965783530 100644 --- a/src/test/java/net/minecraftforge/debug/fluid/ItemFluidHandlerTest.java +++ b/src/test/java/net/minecraftforge/debug/fluid/ItemFluidHandlerTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.fluid; @@ -159,3 +160,4 @@ public class ItemFluidHandlerTest return list; } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/AnytimeSleepingTest.java b/src/test/java/net/minecraftforge/debug/gameplay/AnytimeSleepingTest.java index 4bff353d23..334716fae4 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/AnytimeSleepingTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/AnytimeSleepingTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay; @@ -86,3 +87,4 @@ public class AnytimeSleepingTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/BrewingRecipeRegistryTest.java b/src/test/java/net/minecraftforge/debug/gameplay/BrewingRecipeRegistryTest.java index 674e607b32..3f584a512b 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/BrewingRecipeRegistryTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/BrewingRecipeRegistryTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay; @@ -74,3 +75,4 @@ public class BrewingRecipeRegistryTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/ConstantLoadingTest.java b/src/test/java/net/minecraftforge/debug/gameplay/ConstantLoadingTest.java index 1467c09d33..0903f984fb 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/ConstantLoadingTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/ConstantLoadingTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay; @@ -60,3 +61,4 @@ public class ConstantLoadingTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/CraftingSystemTest.java b/src/test/java/net/minecraftforge/debug/gameplay/CraftingSystemTest.java index eba8510ffb..caea5503aa 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/CraftingSystemTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/CraftingSystemTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay; @@ -77,3 +78,4 @@ public class CraftingSystemTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/DifficultyChangeEventTest.java b/src/test/java/net/minecraftforge/debug/gameplay/DifficultyChangeEventTest.java index b8e4c53497..fa28641d57 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/DifficultyChangeEventTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/DifficultyChangeEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay; @@ -48,4 +49,4 @@ public class DifficultyChangeEventTest { logger.info("Difficulty changed from {} to {}", event.getOldDifficulty(), event.getDifficulty()); } -} \ No newline at end of file +}*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/DynamicBannerTest.java b/src/test/java/net/minecraftforge/debug/gameplay/DynamicBannerTest.java index f73a8f6c26..aaafe41d86 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/DynamicBannerTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/DynamicBannerTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay; @@ -182,3 +183,4 @@ public class DynamicBannerTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/EnchantmentLevelSetEventTest.java b/src/test/java/net/minecraftforge/debug/gameplay/EnchantmentLevelSetEventTest.java index cf83b54c1f..2e34f0c5b5 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/EnchantmentLevelSetEventTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/EnchantmentLevelSetEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay; @@ -51,3 +52,4 @@ public class EnchantmentLevelSetEventTest event.setLevel(30 - event.getLevel()); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/FurnaceFuelBurnTimeEventTest.java b/src/test/java/net/minecraftforge/debug/gameplay/FurnaceFuelBurnTimeEventTest.java index 5fcd88123e..83e8ae22ee 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/FurnaceFuelBurnTimeEventTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/FurnaceFuelBurnTimeEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay; @@ -128,3 +129,4 @@ public class FurnaceFuelBurnTimeEventTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/GiveItemToPlayerTest.java b/src/test/java/net/minecraftforge/debug/gameplay/GiveItemToPlayerTest.java index bd711af6d3..db495e1862 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/GiveItemToPlayerTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/GiveItemToPlayerTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay; @@ -29,12 +30,14 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.items.ItemHandlerHelper; +*/ /** * A mod to test that ItemHandlerHelper.giveItemToPlayer works. * More specifically, that all players, including the one receiving the item, can hear the pickup sound when it happens. * This mod makes it so when you right click the air with a piece of dirt in your hand, you get another piece of dirt. * It's not a dupe glitch...it's a dupe "feature"... - */ + *//* + //@Mod(modid = "giveitemtoplayertest", name = "ItemHandlerHelper.giveItemToPlayer Test", version = "1.0") public class GiveItemToPlayerTest { private static final boolean ENABLED = false; @@ -58,3 +61,4 @@ public class GiveItemToPlayerTest { event.setCancellationResult(EnumActionResult.SUCCESS); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/InputUpdateEventTest.java b/src/test/java/net/minecraftforge/debug/gameplay/InputUpdateEventTest.java index 9031bd47e5..66645030ae 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/InputUpdateEventTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/InputUpdateEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay; @@ -64,3 +65,4 @@ public class InputUpdateEventTest } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/NoBedSleepingTest.java b/src/test/java/net/minecraftforge/debug/gameplay/NoBedSleepingTest.java index 28fb4b56d7..e4c9209339 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/NoBedSleepingTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/NoBedSleepingTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay; @@ -223,3 +224,4 @@ public class NoBedSleepingTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/PotionRegistryTest.java b/src/test/java/net/minecraftforge/debug/gameplay/PotionRegistryTest.java index 791b26ebec..dece06070b 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/PotionRegistryTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/PotionRegistryTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay; @@ -125,3 +126,4 @@ public class PotionRegistryTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/RecipeMatchingTest.java b/src/test/java/net/minecraftforge/debug/gameplay/RecipeMatchingTest.java index 39af234b6f..392ace4f40 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/RecipeMatchingTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/RecipeMatchingTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay; @@ -118,3 +119,4 @@ public class RecipeMatchingTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/advancement/AdvancementCriterionTest.java b/src/test/java/net/minecraftforge/debug/gameplay/advancement/AdvancementCriterionTest.java index 40b9093177..43469203cc 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/advancement/AdvancementCriterionTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/advancement/AdvancementCriterionTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay.advancement; @@ -49,3 +50,4 @@ public class AdvancementCriterionTest { } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/advancement/AdvancementEventTest.java b/src/test/java/net/minecraftforge/debug/gameplay/advancement/AdvancementEventTest.java index 7567e8bc97..8f4571b30d 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/advancement/AdvancementEventTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/advancement/AdvancementEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay.advancement; @@ -53,3 +54,4 @@ public class AdvancementEventTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/advancement/OredictTriggerTest.java b/src/test/java/net/minecraftforge/debug/gameplay/advancement/OredictTriggerTest.java index e63e1c6708..bc4347867c 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/advancement/OredictTriggerTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/advancement/OredictTriggerTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay.advancement; @@ -42,10 +43,12 @@ import java.util.List; import java.util.Map; import java.util.Set; +*/ /** * Most of the real work is in the advancements directory of this mod. * This mod tests ore-dict advancement triggers. - */ + *//* + //@Mod.EventBusSubscriber //@Mod(modid = OredictTriggerTest.MODID, name = "Oredict Item Predicate Test", version = "1.0", acceptableRemoteVersions = "*") public class OredictTriggerTest @@ -59,7 +62,9 @@ public class OredictTriggerTest { try { - final Method tmp = CriteriaTriggers.class.getDeclaredMethod("register"/* func_192118_a */, ICriterionTrigger.class); + final Method tmp = CriteriaTriggers.class.getDeclaredMethod("register"*/ +/* func_192118_a *//* +, ICriterionTrigger.class); tmp.setAccessible(true); ctRegister = MethodHandles.lookup().unreflect(tmp); } @@ -94,9 +99,11 @@ public class OredictTriggerTest } - /** + */ +/** * Far more work than expected…oh well. - */ + *//* + public static class EnabledTrigger implements ICriterionTrigger { public static final ResourceLocation ID = new ResourceLocation(MODID, "is_enabled"); @@ -215,3 +222,4 @@ public class OredictTriggerTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/loot/LootContextTweaksTest.java b/src/test/java/net/minecraftforge/debug/gameplay/loot/LootContextTweaksTest.java index fe4a2557fd..f8fb4b5ef9 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/loot/LootContextTweaksTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/loot/LootContextTweaksTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay.loot; @@ -122,3 +123,4 @@ public class LootContextTweaksTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/loot/LootTableLoadEventTest.java b/src/test/java/net/minecraftforge/debug/gameplay/loot/LootTableLoadEventTest.java index 1447d99873..f1a822fca6 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/loot/LootTableLoadEventTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/loot/LootTableLoadEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay.loot; @@ -55,3 +56,4 @@ public class LootTableLoadEventTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/gameplay/loot/LootTableTest.java b/src/test/java/net/minecraftforge/debug/gameplay/loot/LootTableTest.java index ff3cf5b11b..a37a38e0de 100644 --- a/src/test/java/net/minecraftforge/debug/gameplay/loot/LootTableTest.java +++ b/src/test/java/net/minecraftforge/debug/gameplay/loot/LootTableTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.gameplay.loot; @@ -75,3 +76,4 @@ public class LootTableTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/item/BonemealEventTest.java b/src/test/java/net/minecraftforge/debug/item/BonemealEventTest.java index 2bc34fd076..afd52a276d 100644 --- a/src/test/java/net/minecraftforge/debug/item/BonemealEventTest.java +++ b/src/test/java/net/minecraftforge/debug/item/BonemealEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.item; @@ -69,3 +70,4 @@ public class BonemealEventTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/item/CanApplyAtEnchantingTableTest.java b/src/test/java/net/minecraftforge/debug/item/CanApplyAtEnchantingTableTest.java index b1ccec8d3b..40a1ef7b8b 100644 --- a/src/test/java/net/minecraftforge/debug/item/CanApplyAtEnchantingTableTest.java +++ b/src/test/java/net/minecraftforge/debug/item/CanApplyAtEnchantingTableTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.item; @@ -86,3 +87,4 @@ public class CanApplyAtEnchantingTableTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/item/CanDestroyBlocksInCreativeTest.java b/src/test/java/net/minecraftforge/debug/item/CanDestroyBlocksInCreativeTest.java index a6ba5ba422..a480a1325d 100644 --- a/src/test/java/net/minecraftforge/debug/item/CanDestroyBlocksInCreativeTest.java +++ b/src/test/java/net/minecraftforge/debug/item/CanDestroyBlocksInCreativeTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.item; @@ -59,3 +60,4 @@ public class CanDestroyBlocksInCreativeTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/item/ContinuousUseItemTest.java b/src/test/java/net/minecraftforge/debug/item/ContinuousUseItemTest.java index 19f8d028d7..5aeaeab226 100644 --- a/src/test/java/net/minecraftforge/debug/item/ContinuousUseItemTest.java +++ b/src/test/java/net/minecraftforge/debug/item/ContinuousUseItemTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.item; @@ -131,3 +132,4 @@ public class ContinuousUseItemTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/item/HorseArmorTest.java b/src/test/java/net/minecraftforge/debug/item/HorseArmorTest.java index 4d3e7367b9..ff8bab3156 100644 --- a/src/test/java/net/minecraftforge/debug/item/HorseArmorTest.java +++ b/src/test/java/net/minecraftforge/debug/item/HorseArmorTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.item; @@ -96,3 +97,4 @@ public class HorseArmorTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/item/IsBookEnchantableTest.java b/src/test/java/net/minecraftforge/debug/item/IsBookEnchantableTest.java index 381f112ef8..96c054fee9 100644 --- a/src/test/java/net/minecraftforge/debug/item/IsBookEnchantableTest.java +++ b/src/test/java/net/minecraftforge/debug/item/IsBookEnchantableTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.item; @@ -97,3 +98,4 @@ public class IsBookEnchantableTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/item/ItemFishedEventTest.java b/src/test/java/net/minecraftforge/debug/item/ItemFishedEventTest.java index 726af4bea1..937747cb67 100644 --- a/src/test/java/net/minecraftforge/debug/item/ItemFishedEventTest.java +++ b/src/test/java/net/minecraftforge/debug/item/ItemFishedEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.item; @@ -63,3 +64,4 @@ public class ItemFishedEventTest event.damageRodBy(50); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/item/MapDataTest.java b/src/test/java/net/minecraftforge/debug/item/MapDataTest.java index bf662dce09..adeca89439 100644 --- a/src/test/java/net/minecraftforge/debug/item/MapDataTest.java +++ b/src/test/java/net/minecraftforge/debug/item/MapDataTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.item; @@ -272,3 +273,4 @@ public class MapDataTest } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/item/MendingRepairTest.java b/src/test/java/net/minecraftforge/debug/item/MendingRepairTest.java index ae3aa7ed3b..53a5acde0d 100644 --- a/src/test/java/net/minecraftforge/debug/item/MendingRepairTest.java +++ b/src/test/java/net/minecraftforge/debug/item/MendingRepairTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.item; @@ -92,4 +93,4 @@ public class MendingRepairTest return 0.1f; } } -} \ No newline at end of file +}*/ diff --git a/src/test/java/net/minecraftforge/debug/item/NBTShareTagTest.java b/src/test/java/net/minecraftforge/debug/item/NBTShareTagTest.java index fb08333b7b..b307b0842c 100644 --- a/src/test/java/net/minecraftforge/debug/item/NBTShareTagTest.java +++ b/src/test/java/net/minecraftforge/debug/item/NBTShareTagTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.item; @@ -127,3 +128,4 @@ public class NBTShareTagTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/item/OnItemUseFirstTest.java b/src/test/java/net/minecraftforge/debug/item/OnItemUseFirstTest.java index 2097843f0d..bce0bfd240 100644 --- a/src/test/java/net/minecraftforge/debug/item/OnItemUseFirstTest.java +++ b/src/test/java/net/minecraftforge/debug/item/OnItemUseFirstTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.item; @@ -114,4 +115,4 @@ public class OnItemUseFirstTest return "OnItemUseFirst Returns: " + EnumActionResult.values()[stack.getMetadata()]; } } -} \ No newline at end of file +}*/ diff --git a/src/test/java/net/minecraftforge/debug/item/PotionCurabilityTest.java b/src/test/java/net/minecraftforge/debug/item/PotionCurabilityTest.java index f37726728e..0e24442473 100644 --- a/src/test/java/net/minecraftforge/debug/item/PotionCurabilityTest.java +++ b/src/test/java/net/minecraftforge/debug/item/PotionCurabilityTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.item; @@ -39,13 +40,15 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +*/ /** * Usage (use survival so you can eat food): * 1. Drink curable_potion from Brewing creative tab * 2. Relog to test that changes to curative items persist, then eat the "medicine" item to cure the effect * 3. Drink incurable_potion from Brewing creative tab * 4. Relog to test that changes to curative items persist, then try drinking milk and eating medicine: they should have no effect - */ + *//* + //@Mod(modid = PotionCurabilityTest.MODID, name = "Potion Curative Item Debug", version = "1.0", acceptableRemoteVersions = "*") public class PotionCurabilityTest { @@ -135,3 +138,4 @@ public class PotionCurabilityTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/item/PotionShouldRenderTest.java b/src/test/java/net/minecraftforge/debug/item/PotionShouldRenderTest.java index ee6db95f87..355c1751ff 100644 --- a/src/test/java/net/minecraftforge/debug/item/PotionShouldRenderTest.java +++ b/src/test/java/net/minecraftforge/debug/item/PotionShouldRenderTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.item; @@ -53,3 +54,4 @@ public class PotionShouldRenderTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/item/ShieldTest.java b/src/test/java/net/minecraftforge/debug/item/ShieldTest.java index e31347eb4b..c39e58a0a6 100644 --- a/src/test/java/net/minecraftforge/debug/item/ShieldTest.java +++ b/src/test/java/net/minecraftforge/debug/item/ShieldTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.item; @@ -102,4 +103,4 @@ public class ShieldTest ModelLoader.setCustomModelResourceLocation(DIAMOND_SHIELD, 0, new ModelResourceLocation("shield_test:diamond_shield", "inventory")); ModelLoader.setCustomModelResourceLocation(HEAVY_DIAMOND_SWORD, 0, new ModelResourceLocation("minecraft:diamond_sword", "inventory")); } -} \ No newline at end of file +}*/ diff --git a/src/test/java/net/minecraftforge/debug/misc/EnumPlantTypeTest.java b/src/test/java/net/minecraftforge/debug/misc/EnumPlantTypeTest.java index f514daefdb..b181c5877b 100644 --- a/src/test/java/net/minecraftforge/debug/misc/EnumPlantTypeTest.java +++ b/src/test/java/net/minecraftforge/debug/misc/EnumPlantTypeTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.misc; @@ -59,3 +60,4 @@ public class EnumPlantTypeTest }); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/mod/CapabilityTest.java b/src/test/java/net/minecraftforge/debug/mod/CapabilityTest.java index f20bef82e2..ea2ec424b7 100644 --- a/src/test/java/net/minecraftforge/debug/mod/CapabilityTest.java +++ b/src/test/java/net/minecraftforge/debug/mod/CapabilityTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.mod; @@ -320,3 +321,4 @@ public class CapabilityTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/mod/ClientLoadingExceptionTest.java b/src/test/java/net/minecraftforge/debug/mod/ClientLoadingExceptionTest.java index bf2ba48a61..964668d98e 100644 --- a/src/test/java/net/minecraftforge/debug/mod/ClientLoadingExceptionTest.java +++ b/src/test/java/net/minecraftforge/debug/mod/ClientLoadingExceptionTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.mod; @@ -107,3 +108,4 @@ public class ClientLoadingExceptionTest }; } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/mod/ConfigAnnotationTest.java b/src/test/java/net/minecraftforge/debug/mod/ConfigAnnotationTest.java index 29d0e8611d..c01580d2aa 100644 --- a/src/test/java/net/minecraftforge/debug/mod/ConfigAnnotationTest.java +++ b/src/test/java/net/minecraftforge/debug/mod/ConfigAnnotationTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.mod; @@ -226,3 +227,4 @@ public class ConfigAnnotationTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/mod/ObjectHolderAnnotationTest.java b/src/test/java/net/minecraftforge/debug/mod/ObjectHolderAnnotationTest.java index c3ed3db29b..fd962309dc 100644 --- a/src/test/java/net/minecraftforge/debug/mod/ObjectHolderAnnotationTest.java +++ b/src/test/java/net/minecraftforge/debug/mod/ObjectHolderAnnotationTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.mod; @@ -151,3 +152,4 @@ public class ObjectHolderAnnotationTest public static final ICustomRegistryEntry custom_entry_by_interface = null; } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/mod/PermissionTest.java b/src/test/java/net/minecraftforge/debug/mod/PermissionTest.java index bb6dd16839..7456a164d0 100644 --- a/src/test/java/net/minecraftforge/debug/mod/PermissionTest.java +++ b/src/test/java/net/minecraftforge/debug/mod/PermissionTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.mod; @@ -194,3 +195,4 @@ public class PermissionTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/mod/RegistryOverrideTest.java b/src/test/java/net/minecraftforge/debug/mod/RegistryOverrideTest.java index 2227cc8b40..9b5c698672 100644 --- a/src/test/java/net/minecraftforge/debug/mod/RegistryOverrideTest.java +++ b/src/test/java/net/minecraftforge/debug/mod/RegistryOverrideTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.mod; @@ -123,3 +124,4 @@ public class RegistryOverrideTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/network/BigNetworkMessageTest.java b/src/test/java/net/minecraftforge/debug/network/BigNetworkMessageTest.java index b9435d4995..4a4667473f 100644 --- a/src/test/java/net/minecraftforge/debug/network/BigNetworkMessageTest.java +++ b/src/test/java/net/minecraftforge/debug/network/BigNetworkMessageTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.network; @@ -83,3 +84,4 @@ public class BigNetworkMessageTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/network/TrackingTargetTest.java b/src/test/java/net/minecraftforge/debug/network/TrackingTargetTest.java index 24863f089f..db2bcd0c11 100644 --- a/src/test/java/net/minecraftforge/debug/network/TrackingTargetTest.java +++ b/src/test/java/net/minecraftforge/debug/network/TrackingTargetTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.network; @@ -139,3 +140,4 @@ public class TrackingTargetTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/util/ModNameTooltip.java b/src/test/java/net/minecraftforge/debug/util/ModNameTooltip.java index 786e15d2cf..87ddc5b4c9 100644 --- a/src/test/java/net/minecraftforge/debug/util/ModNameTooltip.java +++ b/src/test/java/net/minecraftforge/debug/util/ModNameTooltip.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.util; @@ -63,3 +64,4 @@ public class ModNameTooltip return null; } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/util/RotatingWrench.java b/src/test/java/net/minecraftforge/debug/util/RotatingWrench.java index f310f897fe..185eb3eb9a 100644 --- a/src/test/java/net/minecraftforge/debug/util/RotatingWrench.java +++ b/src/test/java/net/minecraftforge/debug/util/RotatingWrench.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.util; @@ -101,3 +102,4 @@ public class RotatingWrench } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/util/TextureDumper.java b/src/test/java/net/minecraftforge/debug/util/TextureDumper.java index 93f55bf71c..abce4726b1 100644 --- a/src/test/java/net/minecraftforge/debug/util/TextureDumper.java +++ b/src/test/java/net/minecraftforge/debug/util/TextureDumper.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.util; @@ -99,3 +100,4 @@ public class TextureDumper } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/village/MerchantTradeOffersEventTest.java b/src/test/java/net/minecraftforge/debug/village/MerchantTradeOffersEventTest.java index 457d5824b2..083a91c61c 100644 --- a/src/test/java/net/minecraftforge/debug/village/MerchantTradeOffersEventTest.java +++ b/src/test/java/net/minecraftforge/debug/village/MerchantTradeOffersEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.village; @@ -29,10 +30,12 @@ import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +*/ /** * Tests {@link MerchantTradeOffersEvent}. When enabled, the item that the villager sells to * the player will be maxed out in stack size. - */ + *//* + //@Mod(modid = MerchantTradeOffersEventTest.MODID, name = MerchantTradeOffersEventTest.NAME, version = "0.0.0", acceptableRemoteVersions = "*") public class MerchantTradeOffersEventTest { @@ -64,3 +67,4 @@ public class MerchantTradeOffersEventTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/village/VillageSiegeEventTest.java b/src/test/java/net/minecraftforge/debug/village/VillageSiegeEventTest.java index f14c33b538..77066aad92 100644 --- a/src/test/java/net/minecraftforge/debug/village/VillageSiegeEventTest.java +++ b/src/test/java/net/minecraftforge/debug/village/VillageSiegeEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.village; @@ -31,10 +32,12 @@ import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +*/ /** * Tests {@link VillageSiegeEvent}. When enabled, players holding a diamond sword in the mainhand * slot are not counted in determining where the zombie siege occurs. - */ + *//* + //@Mod(modid = VillageSiegeEventTest.MODID, name = VillageSiegeEventTest.NAME, version = "0.0.0", acceptableRemoteVersions = "*") public class VillageSiegeEventTest { @@ -63,3 +66,4 @@ public class VillageSiegeEventTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/world/ChunkCapabilityTest.java b/src/test/java/net/minecraftforge/debug/world/ChunkCapabilityTest.java index 1baf574841..b4d7a527cc 100644 --- a/src/test/java/net/minecraftforge/debug/world/ChunkCapabilityTest.java +++ b/src/test/java/net/minecraftforge/debug/world/ChunkCapabilityTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.world; @@ -43,10 +44,12 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; import javax.annotation.Nonnull; import javax.annotation.Nullable; +*/ /** * Simple mod to test chunk capabilities. * Use flint and steel to increase pollution in a chunk and saplings to decrease pollution in a chunk. - */ + *//* + //@Mod(modid = ChunkCapabilityTest.MODID, name = "Chunk Capability Test", version = "0.0.0", acceptableRemoteVersions = "*") public class ChunkCapabilityTest { @@ -93,10 +96,12 @@ public class ChunkCapabilityTest } } - /** + */ +/** * Marks the chunk as dirty when the value changes. * Cannot be the default implementation because it requires a chunk in the constructor - */ + *//* + public static class SafePollution extends DefaultPollution { private final Chunk chunk; @@ -195,3 +200,4 @@ public class ChunkCapabilityTest } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/world/ChunkWatchEventTest.java b/src/test/java/net/minecraftforge/debug/world/ChunkWatchEventTest.java index cb641fdb47..80843cc54b 100644 --- a/src/test/java/net/minecraftforge/debug/world/ChunkWatchEventTest.java +++ b/src/test/java/net/minecraftforge/debug/world/ChunkWatchEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.world; @@ -58,3 +59,4 @@ public class ChunkWatchEventTest logger.info("Watching chunk {} in dimension {}. Player's dimension: {} ", event.getChunk(), event.getChunkInstance().getWorld().provider.getDimension(), event.getPlayer().getEntityWorld().provider.getDimension()); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/world/DecorateEventDebug.java b/src/test/java/net/minecraftforge/debug/world/DecorateEventDebug.java index 9c47d41e29..25550780d7 100644 --- a/src/test/java/net/minecraftforge/debug/world/DecorateEventDebug.java +++ b/src/test/java/net/minecraftforge/debug/world/DecorateEventDebug.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.world; @@ -51,3 +52,4 @@ public class DecorateEventDebug event.setResult(Result.DENY); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/world/SpawnDimensionTest.java b/src/test/java/net/minecraftforge/debug/world/SpawnDimensionTest.java index 00bfd2a9f2..9745890c97 100644 --- a/src/test/java/net/minecraftforge/debug/world/SpawnDimensionTest.java +++ b/src/test/java/net/minecraftforge/debug/world/SpawnDimensionTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.world; @@ -58,3 +59,4 @@ public class SpawnDimensionTest ((EntityPlayer) e).setSpawnChunk(pos, true, dim); } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/world/TileEntityLoadingTest.java b/src/test/java/net/minecraftforge/debug/world/TileEntityLoadingTest.java index 0f18ce2454..04b96b1649 100644 --- a/src/test/java/net/minecraftforge/debug/world/TileEntityLoadingTest.java +++ b/src/test/java/net/minecraftforge/debug/world/TileEntityLoadingTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.world; @@ -131,3 +132,4 @@ public class TileEntityLoadingTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/world/WorldCapabilityTest.java b/src/test/java/net/minecraftforge/debug/world/WorldCapabilityTest.java index 283486f9e8..9af914a9fc 100644 --- a/src/test/java/net/minecraftforge/debug/world/WorldCapabilityTest.java +++ b/src/test/java/net/minecraftforge/debug/world/WorldCapabilityTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.world; @@ -40,9 +41,11 @@ import net.minecraftforge.fml.common.gameevent.TickEvent; import javax.annotation.Nonnull; import javax.annotation.Nullable; +*/ /** * Simple mod to test world capability, by adding timer logic and check for raining time. - */ + *//* + //@Mod(modid = WorldCapabilityTest.MODID, name = "World Periodic Rain Check Test", version = "0.0.0", acceptableRemoteVersions = "*") public class WorldCapabilityTest { @@ -220,3 +223,4 @@ public class WorldCapabilityTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/debug/world/WorldProviderCanSleepAtTest.java b/src/test/java/net/minecraftforge/debug/world/WorldProviderCanSleepAtTest.java index e348897e10..831e20e98f 100644 --- a/src/test/java/net/minecraftforge/debug/world/WorldProviderCanSleepAtTest.java +++ b/src/test/java/net/minecraftforge/debug/world/WorldProviderCanSleepAtTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.debug.world; @@ -67,3 +68,4 @@ public class WorldProviderCanSleepAtTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/fml/common/registry/BlockStateMappingsTest.java b/src/test/java/net/minecraftforge/fml/common/registry/BlockStateMappingsTest.java index b899af1aa3..b0614b76d7 100644 --- a/src/test/java/net/minecraftforge/fml/common/registry/BlockStateMappingsTest.java +++ b/src/test/java/net/minecraftforge/fml/common/registry/BlockStateMappingsTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.fml.common.registry; @@ -33,9 +34,11 @@ import org.junit.runner.RunWith; import static org.junit.Assert.assertEquals; +*/ /** * Test block state mappings bidirectionality - */ + *//* + @RunWith(ForgeTestRunner.class) public class BlockStateMappingsTest { @@ -72,3 +75,4 @@ public class BlockStateMappingsTest } } +*/ diff --git a/src/test/java/net/minecraftforge/fml/common/registry/DummyBlockReplacementTest.java b/src/test/java/net/minecraftforge/fml/common/registry/DummyBlockReplacementTest.java index a78396928d..bcd06584b5 100644 --- a/src/test/java/net/minecraftforge/fml/common/registry/DummyBlockReplacementTest.java +++ b/src/test/java/net/minecraftforge/fml/common/registry/DummyBlockReplacementTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.fml.common.registry; @@ -42,9 +43,11 @@ import java.util.Set; import static org.junit.Assert.*; +*/ /** * Dummy block replacement test - */ + *//* + @RunWith(ForgeTestRunner.class) public class DummyBlockReplacementTest { @@ -120,3 +123,4 @@ public class DummyBlockReplacementTest assertTrue("Found a dummy air block", fnd.getClass().getName().endsWith("BlockDummyAir")); } } +*/ diff --git a/src/test/java/net/minecraftforge/fml/common/registry/ForgeTestRunner.java b/src/test/java/net/minecraftforge/fml/common/registry/ForgeTestRunner.java index 5904da0475..2e93462ee5 100644 --- a/src/test/java/net/minecraftforge/fml/common/registry/ForgeTestRunner.java +++ b/src/test/java/net/minecraftforge/fml/common/registry/ForgeTestRunner.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.fml.common.registry; @@ -31,6 +32,7 @@ import java.net.URLClassLoader; import java.util.Collections; import java.util.Set; +*/ /** * Uses {@code ResettingClassLoader} to load the test class. Minecraft and Forge * classes are loaded using the separate class loader. @@ -47,7 +49,8 @@ import java.util.Set; * This is a simplified copy of https://github.com/BinaryTweed/quarantining-test-runner * tailored for Minecraft use. * - */ + *//* + public class ForgeTestRunner extends Runner { private final Object innerRunner; @@ -104,17 +107,21 @@ public class ForgeTestRunner extends Runner } } - /** + */ +/** * If a class name starts with any of the supplied patterns, it is loaded by * this classloader; otherwise it is loaded by the parent classloader. - */ + *//* + private class ResettingClassLoader extends URLClassLoader { private final Set quarantinedClassNames; - /** + */ +/** * @param quarantinedClassNames prefixes to match against when deciding how to load a class - */ + *//* + public ResettingClassLoader(String... quarantinedClassNames) { super(((URLClassLoader) getSystemClassLoader()).getURLs()); @@ -125,12 +132,14 @@ public class ForgeTestRunner extends Runner } - /** + */ +/** * If a class name starts with any of the supplied patterns, it is loaded by * this classloader; otherwise it is loaded by the parent classloader. * * @param name class to load - */ + *//* + @Override public Class loadClass(String name) throws ClassNotFoundException { @@ -161,3 +170,4 @@ public class ForgeTestRunner extends Runner } } } +*/ diff --git a/src/test/java/net/minecraftforge/fml/common/registry/FreezingTests.java b/src/test/java/net/minecraftforge/fml/common/registry/FreezingTests.java index 62cc5910df..42afc9adf5 100644 --- a/src/test/java/net/minecraftforge/fml/common/registry/FreezingTests.java +++ b/src/test/java/net/minecraftforge/fml/common/registry/FreezingTests.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.fml.common.registry; @@ -41,9 +42,11 @@ import static org.junit.Assert.assertNotEquals; import java.util.Map; +*/ /** * Created by cpw on 04/07/16. - */ + *//* + @RunWith(ForgeTestRunner.class) public class FreezingTests { @@ -150,3 +153,4 @@ public class FreezingTests assertEquals("Active object not the same", r3, active.getValue(name)); } } +*/ diff --git a/src/test/java/net/minecraftforge/fml/common/registry/ItemBlockSubstitutionRemoveRestoreTest.java b/src/test/java/net/minecraftforge/fml/common/registry/ItemBlockSubstitutionRemoveRestoreTest.java index 7a6183fa35..93a4478376 100644 --- a/src/test/java/net/minecraftforge/fml/common/registry/ItemBlockSubstitutionRemoveRestoreTest.java +++ b/src/test/java/net/minecraftforge/fml/common/registry/ItemBlockSubstitutionRemoveRestoreTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.fml.common.registry; @@ -43,9 +44,11 @@ import javax.annotation.Nonnull; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; +*/ /** * Substitution test harness - tests that substitutions behave correctly - */ + *//* + @RunWith(ForgeTestRunner.class) public class ItemBlockSubstitutionRemoveRestoreTest { @@ -96,7 +99,8 @@ public class ItemBlockSubstitutionRemoveRestoreTest assertEquals("ItemBlock points at my block", myDirtInstance, dirtitem); // TEST 2: Does the substitute get removed when told by remote operation? The substitute should NOT be found in the registry - /* Why should it not be found? Substitutions are no longer special cases + */ +/* Why should it not be found? Substitutions are no longer special cases Map snapshot = RegistryManager.ACTIVE.takeSnapshot(false); snapshot.get(GameData.ITEMS).substitutions.clear(); GameData.injectSnapshot(snapshot, false, false); @@ -105,7 +109,8 @@ public class ItemBlockSubstitutionRemoveRestoreTest dirtitem = (ItemBlock) itemRegistry.getValue(myDirt); assertEquals("ItemBlock points at vanilla block", originalDirt, dirtitem); assertNotEquals("ItemBlock points at my block", myDirtInstance, dirtitem); - */ + *//* + // TEST 3: Does the substitute get restored when reverting to frozen state? The substitute should be found in the registry again GameData.revertToFrozen(); @@ -114,3 +119,4 @@ public class ItemBlockSubstitutionRemoveRestoreTest assertEquals("ItemBlock points at my block", myDirtInstance, dirtitem); } } +*/ diff --git a/src/test/java/net/minecraftforge/fml/common/registry/RegistryTestSuite.java b/src/test/java/net/minecraftforge/fml/common/registry/RegistryTestSuite.java index f6ce566b39..0ccdfa61ce 100644 --- a/src/test/java/net/minecraftforge/fml/common/registry/RegistryTestSuite.java +++ b/src/test/java/net/minecraftforge/fml/common/registry/RegistryTestSuite.java @@ -15,18 +15,22 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.fml.common.registry; import org.junit.runner.RunWith; import org.junit.runners.Suite; +*/ /** * Run the full suite of tests - */ + *//* + @RunWith(Suite.class) @Suite.SuiteClasses({VanillaRegistryTests.class, FreezingTests.class, SubstitutionRemoveRestoreTest.class, SubstitutionInjectionTest.class, DummyBlockReplacementTest.class, BlockStateMappingsTest.class}) public class RegistryTestSuite { } +*/ diff --git a/src/test/java/net/minecraftforge/fml/common/registry/SubstitutionInjectionTest.java b/src/test/java/net/minecraftforge/fml/common/registry/SubstitutionInjectionTest.java index 8315a473ea..c26d93f389 100644 --- a/src/test/java/net/minecraftforge/fml/common/registry/SubstitutionInjectionTest.java +++ b/src/test/java/net/minecraftforge/fml/common/registry/SubstitutionInjectionTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.fml.common.registry; @@ -45,9 +46,11 @@ import static org.junit.Assert.fail; import java.util.Map; +*/ /** * Substitution test harness - tests that substitutions behave correctly - */ + *//* + @RunWith(ForgeTestRunner.class) public class SubstitutionInjectionTest { @@ -161,3 +164,4 @@ public class SubstitutionInjectionTest assertEquals("ItemBlock points at vanilla block", toSub, dirtitem.getBlock()); } } +*/ diff --git a/src/test/java/net/minecraftforge/fml/common/registry/SubstitutionRemoveRestoreTest.java b/src/test/java/net/minecraftforge/fml/common/registry/SubstitutionRemoveRestoreTest.java index 56630bcbc9..b638e5f8fc 100644 --- a/src/test/java/net/minecraftforge/fml/common/registry/SubstitutionRemoveRestoreTest.java +++ b/src/test/java/net/minecraftforge/fml/common/registry/SubstitutionRemoveRestoreTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.fml.common.registry; @@ -33,9 +34,11 @@ import org.junit.runner.RunWith; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; +*/ /** * Substitution test harness - tests that substitutions behave correctly - */ + *//* + @RunWith(ForgeTestRunner.class) public class SubstitutionRemoveRestoreTest { @@ -56,7 +59,8 @@ public class SubstitutionRemoveRestoreTest @Test public void testSubstitutionRemovalAndRestore() throws Exception { - /* TODO: Figure this one out, We dont prevent the client from loading subs when the server says not to.. + */ +/* TODO: Figure this one out, We dont prevent the client from loading subs when the server says not to.. * Why should we as long as the item is on both sides we should be fine. It's on the modder to make sure they are compatible. * final ForgeRegistry blockRegistry = (ForgeRegistry)RegistryManager.ACTIVE.getRegistry(Block.class); @@ -103,6 +107,8 @@ public class SubstitutionRemoveRestoreTest dirtitem = (ItemBlock) itemRegistry.getValue(MC_DIRT); assertEquals("ItemBlock points at my block", toSub, dirtitem.block); - */ + *//* + } } +*/ diff --git a/src/test/java/net/minecraftforge/fml/common/registry/VanillaRegistryTests.java b/src/test/java/net/minecraftforge/fml/common/registry/VanillaRegistryTests.java index ccdfa678fa..8471287c7a 100644 --- a/src/test/java/net/minecraftforge/fml/common/registry/VanillaRegistryTests.java +++ b/src/test/java/net/minecraftforge/fml/common/registry/VanillaRegistryTests.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.fml.common.registry; @@ -39,9 +40,11 @@ import static org.junit.Assert.*; import java.lang.reflect.Field; +*/ /** * Vanilla registry tests - */ + *//* + @RunWith(ForgeTestRunner.class) public class VanillaRegistryTests { @@ -137,3 +140,4 @@ public class VanillaRegistryTests } +*/ diff --git a/src/test/java/net/minecraftforge/fml/debug/FaultyCoreMod.java b/src/test/java/net/minecraftforge/fml/debug/FaultyCoreMod.java index 9a972911d4..ed95b3ee88 100644 --- a/src/test/java/net/minecraftforge/fml/debug/FaultyCoreMod.java +++ b/src/test/java/net/minecraftforge/fml/debug/FaultyCoreMod.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.fml.debug; @@ -70,3 +71,4 @@ public class FaultyCoreMod implements IFMLLoadingPlugin } } } +*/ diff --git a/src/test/java/net/minecraftforge/fml/test/ForgeNetworkTestMod.java b/src/test/java/net/minecraftforge/fml/test/ForgeNetworkTestMod.java index 640a9ad5a8..2a43106f8e 100644 --- a/src/test/java/net/minecraftforge/fml/test/ForgeNetworkTestMod.java +++ b/src/test/java/net/minecraftforge/fml/test/ForgeNetworkTestMod.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.fml.test; @@ -84,3 +85,4 @@ public class ForgeNetworkTestMod logger.info("Received packet from server"); } } +*/ diff --git a/src/test/java/net/minecraftforge/fml/test/ModsTomlTest.java b/src/test/java/net/minecraftforge/fml/test/ModsTomlTest.java deleted file mode 100644 index 5ad614ae34..0000000000 --- a/src/test/java/net/minecraftforge/fml/test/ModsTomlTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Minecraft Forge - * Copyright (c) 2016-2019. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package net.minecraftforge.fml.test; - -import net.minecraftforge.fml.language.IModFileInfo; -import net.minecraftforge.fml.loading.moddiscovery.ModFileParser; -import org.junit.Test; - -import java.io.IOException; -import java.net.URISyntaxException; -import java.net.URL; -import java.nio.file.FileSystem; -import java.nio.file.FileSystems; -import java.nio.file.Path; -import java.nio.file.Paths; - -public class ModsTomlTest -{ - @Test - public void testTomlLoad() throws URISyntaxException - { - final URL resource = getClass().getClassLoader().getResource("mods.toml"); - final Path path = Paths.get(resource.toURI()); - final IModFileInfo modFileInfo = ModFileParser.loadModFile(null, path); - modFileInfo.getMods(); - } - - @Test - public void testTomlInJar() throws URISyntaxException, IOException - { - final URL resource = getClass().getClassLoader().getResource("mod.jar"); - - final FileSystem fileSystem = FileSystems.newFileSystem(Paths.get(resource.toURI()), getClass().getClassLoader()); - final Path path = fileSystem.getPath("META-INF", "mods.toml"); - ModFileParser.loadModFile(null, path); - } -} diff --git a/src/test/java/net/minecraftforge/fml/test/SpecialSpawnEventTest.java b/src/test/java/net/minecraftforge/fml/test/SpecialSpawnEventTest.java index 8f14ed925c..9dc06935ee 100644 --- a/src/test/java/net/minecraftforge/fml/test/SpecialSpawnEventTest.java +++ b/src/test/java/net/minecraftforge/fml/test/SpecialSpawnEventTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.fml.test; @@ -63,3 +64,4 @@ public class SpecialSpawnEventTest { } } } +*/ diff --git a/src/test/java/net/minecraftforge/fml/test/TestNetStuff.java b/src/test/java/net/minecraftforge/fml/test/TestNetStuff.java deleted file mode 100644 index cdee6bcece..0000000000 --- a/src/test/java/net/minecraftforge/fml/test/TestNetStuff.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Minecraft Forge - * Copyright (c) 2016-2019. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package net.minecraftforge.fml.test; - -import com.google.common.base.Strings; -import io.netty.buffer.ByteBuf; -import io.netty.buffer.Unpooled; -import net.minecraftforge.fml.common.network.ByteBufUtils; -import org.junit.Test; - -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; - -public class TestNetStuff -{ - - @Test - public void testByteBufUtilsByteCount() - { - assertEquals("length of 1 is 1", 1, ByteBufUtils.varIntByteCount(1)); - assertEquals("length of 127 is 1", 1, ByteBufUtils.varIntByteCount(127)); - assertEquals("length of 128 is 2", 2, ByteBufUtils.varIntByteCount(128)); - assertEquals("length of 16383 is 2", 2, ByteBufUtils.varIntByteCount(16383)); - assertEquals("length of 16384 is 3", 3, ByteBufUtils.varIntByteCount(16384)); - assertEquals("length of 2097151 is 3", 3, ByteBufUtils.varIntByteCount(2097151)); - assertEquals("length of 2097152 is 4", 4, ByteBufUtils.varIntByteCount(2097152)); - assertEquals("length of 268435455 is 4", 4, ByteBufUtils.varIntByteCount(268435455)); - assertEquals("length of 268435456 is 5", 5, ByteBufUtils.varIntByteCount(268435456)); - assertEquals("length of MIN_VAL is 5", 5, ByteBufUtils.varIntByteCount(Integer.MIN_VALUE)); - assertEquals("length of MAX_VAL is 5", 5, ByteBufUtils.varIntByteCount(Integer.MAX_VALUE)); - assertEquals("length of -1 is 5", 5, ByteBufUtils.varIntByteCount(-1)); - } - - @Test - public void testByteBufUtilsByteArrays() - { - ByteBuf buf = Unpooled.buffer(5, 5); - ByteBufUtils.writeVarInt(buf, 1, 1); - assertArrayEquals("1 as byte[] is [1]", new byte[]{1, 0, 0, 0, 0}, buf.array()); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 127, 1); - assertArrayEquals("127 as byte[] is [127]", new byte[]{127, 0, 0, 0, 0}, buf.array()); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 128, 2); - assertArrayEquals("128 as byte[] is [-128, 1]", new byte[]{-128, 1, 0, 0, 0}, buf.array()); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 16383, 2); - assertArrayEquals("16383 as byte[] is [-1, 127]", new byte[]{-1, 127, 0, 0, 0}, buf.array()); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 16384, 3); - assertArrayEquals("16384 as byte[] is [-1, -128, 1]", new byte[]{-128, -128, 1, 0, 0}, buf.array()); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 2097151, 3); - assertArrayEquals("2097151 as byte[] is [-1, -1, 127]", new byte[]{-1, -1, 127, 0, 0}, buf.array()); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 2097152, 4); - assertArrayEquals("16384 as byte[] is [-128, -128, 1]", new byte[]{-128, -128, -128, 1, 0}, buf.array()); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 268435455, 4); - assertArrayEquals("268435455 as byte[] is [-1, -1, -1, 127]", new byte[]{-1, -1, -1, 127, 0}, buf.array()); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 268435456, 5); - assertArrayEquals("268435456 as byte[] is [-1, -128, 1]", new byte[]{-128, -128, -128, -128, 1}, buf.array()); - } - - @Test - public void testByteBufUtilsByteReversals() - { - ByteBuf buf = Unpooled.buffer(5, 5); - ByteBufUtils.writeVarInt(buf, 1, 1); - assertEquals("1 is 1", 1, ByteBufUtils.readVarInt(buf, 1)); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 127, 1); - assertEquals("127 is 127", 127, ByteBufUtils.readVarInt(buf, 1)); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 128, 2); - assertEquals("128 is 128", 128, ByteBufUtils.readVarInt(buf, 2)); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 16383, 2); - assertEquals("16383 is 16383", 16383, ByteBufUtils.readVarInt(buf, 2)); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 16384, 3); - assertEquals("16384 is 16384", 16384, ByteBufUtils.readVarInt(buf, 3)); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 2097151, 3); - assertEquals("2097151 is 2097151", 2097151, ByteBufUtils.readVarInt(buf, 3)); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 2097152, 4); - assertEquals("2097152 is 2097152", 2097152, ByteBufUtils.readVarInt(buf, 4)); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 268435455, 4); - assertEquals("268435455 is 268435455", 268435455, ByteBufUtils.readVarInt(buf, 4)); - - buf.clear(); - ByteBufUtils.writeVarInt(buf, 268435456, 5); - assertEquals("268435456 is 268435456", 268435456, ByteBufUtils.readVarInt(buf, 5)); - } - - @Test - public void testByteBufUtilsStrings() - { - String test = "test"; - ByteBuf buf = Unpooled.buffer(20, 20); - ByteBufUtils.writeUTF8String(buf, test); - assertArrayEquals("String bytes", new byte[]{4, 116, 101, 115, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, buf.array()); - - String repeat = Strings.repeat("test", 100); - buf = Unpooled.buffer(420, 420); - ByteBufUtils.writeUTF8String(buf, repeat); - assertArrayEquals("String repeat bytes", new byte[]{-112, 3, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 116, 101, 115, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, buf.array()); - } - - - @Test - public void testVarShort() - { - ByteBuf buf = Unpooled.buffer(3, 3); - ByteBufUtils.writeVarShort(buf, 32766); - assertArrayEquals("Two byte short written", new byte[]{127, -2, 0}, buf.array()); - assertEquals("Two byte short written", 2, buf.readableBytes()); - - buf.clear(); - buf.writeZero(3); - buf.clear(); - - buf.writeShort(32766); - assertArrayEquals("Two byte short written", new byte[]{127, -2, 0}, buf.array()); - int val = ByteBufUtils.readVarShort(buf); - - assertEquals("Two byte short read correctly", 32766, val); - - buf.clear(); - buf.writeZero(3); - buf.clear(); - - ByteBufUtils.writeVarShort(buf, 32768); - assertArrayEquals("Three byte short written", new byte[]{-128, 0, 1}, buf.array()); - assertEquals("Three byte short written", 3, buf.readableBytes()); - - buf.clear(); - buf.writeZero(3); - buf.clear(); - buf.writeShort(-32768); - buf.writeByte(1); - val = ByteBufUtils.readVarShort(buf); - assertEquals("Three byte short read correctly", 32768, val); - - buf.clear(); - buf.writeZero(3); - buf.clear(); - - ByteBufUtils.writeVarShort(buf, 8388607); - assertArrayEquals("Three byte short written", new byte[]{-1, -1, -1}, buf.array()); - assertEquals("Three byte short written", 3, buf.readableBytes()); - - buf.clear(); - buf.writeZero(3); - buf.clear(); - buf.writeShort(-1); - buf.writeByte(-1); - val = ByteBufUtils.readVarShort(buf); - assertEquals("Three byte short read correctly", 8388607, val); - } -} diff --git a/src/test/java/net/minecraftforge/fml/test/networkhandshake/TestNetworkHandshake.java b/src/test/java/net/minecraftforge/fml/test/networkhandshake/TestNetworkHandshake.java deleted file mode 100644 index 381442e7a8..0000000000 --- a/src/test/java/net/minecraftforge/fml/test/networkhandshake/TestNetworkHandshake.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Minecraft Forge - * Copyright (c) 2016-2019. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package net.minecraftforge.fml.test.networkhandshake; - -import com.mojang.authlib.GameProfile; -import net.minecraft.network.EnumConnectionState; -import net.minecraft.network.INetHandler; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.NetworkSystem; -import net.minecraft.network.Packet; -import net.minecraft.network.login.INetHandlerLoginClient; -import net.minecraft.network.login.server.SPacketLoginSuccess; -import net.minecraft.network.play.INetHandlerPlayClient; -import net.minecraft.network.play.server.SPacketJoinGame; -import net.minecraft.server.MinecraftServer; -import net.minecraft.world.EnumDifficulty; -import net.minecraft.world.GameType; -import net.minecraft.world.WorldType; -import org.apache.logging.log4j.Level; -import org.apache.logging.log4j.core.Filter; -import org.apache.logging.log4j.core.config.Configurator; -import org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilder; -import org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilderFactory; -import org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.Timeout; - -import java.io.IOException; -import java.lang.reflect.Field; -import java.lang.reflect.Proxy; -import java.net.InetAddress; -import java.nio.file.Paths; -import java.util.List; -import java.util.concurrent.BrokenBarrierException; -import java.util.concurrent.CyclicBarrier; - -import static org.junit.Assert.assertEquals; - -public class TestNetworkHandshake -{ - private static final Packet[] vanillapackets = new Packet[] { - new SPacketLoginSuccess(new GameProfile(null, "cheese")), new SPacketJoinGame(1, GameType.NOT_SET, false, 0, EnumDifficulty.PEACEFUL, 100, WorldType.DEFAULT, false) - }; - - private NetworkSystem listener; - public static NetworkManager client; - public static NetworkManager server; - private CyclicBarrier barrier; - - @Rule - public Timeout globalTimeout = Timeout.seconds(10); // 10 seconds max per method tested, including setup - - @BeforeClass - public static void setupLogging() { - ConfigurationBuilder builder = ConfigurationBuilderFactory.newConfigurationBuilder(); - builder.add(builder.newFilter("MarkerFilter", Filter.Result.ACCEPT, Filter.Result.NEUTRAL).addAttribute("marker", "NETWORK")); - builder.add(builder.newFilter("MarkerFilter", Filter.Result.ACCEPT, Filter.Result.NEUTRAL).addAttribute("marker", "PACKET_RECEIVED")); - builder.add(builder.newFilter("MarkerFilter", Filter.Result.ACCEPT, Filter.Result.NEUTRAL).addAttribute("marker", "PACKET_SENT")); - Configurator.initialize(builder.build()); - Configurator.setRootLevel(Level.DEBUG); - } - - @Before - public void setup() throws IOException, NoSuchFieldException, IllegalAccessException, InterruptedException - { - if (true) return; - barrier = new CyclicBarrier(2); - final MinecraftServer minecraftServer = new MinecraftServer(Paths.get(".").toFile(), null, null, null, null, null, null) - { - @Override - public boolean init() throws IOException - { - return false; - } - - @Override - public boolean canStructuresSpawn() - { - return false; - } - - @Override - public GameType getGameType() - { - return null; - } - - @Override - public EnumDifficulty getDifficulty() - { - return null; - } - - @Override - public boolean isHardcore() - { - return false; - } - - @Override - public int getOpPermissionLevel() - { - return 0; - } - - @Override - public boolean shouldBroadcastRconToOps() - { - return false; - } - - @Override - public boolean shouldBroadcastConsoleToOps() - { - return false; - } - - @Override - public boolean isDedicatedServer() - { - return false; - } - - @Override - public boolean shouldUseNativeTransport() - { - return false; - } - - @Override - public boolean isCommandBlockEnabled() - { - return false; - } - - @Override - public String shareToLAN(GameType type, boolean allowCheats) - { - return null; - } - }; - listener = minecraftServer.getNetworkSystem(); - listener.addLanEndpoint(InetAddress.getLocalHost(), 54321); - final Field networkManagers = listener.getClass().getDeclaredField("networkManagers"); - networkManagers.setAccessible(true); - final List nmList = (List)networkManagers.get(listener); - client = NetworkManager.createNetworkManagerAndConnect(InetAddress.getLocalHost(), 54321, true); - while (nmList.isEmpty()) - { - Thread.sleep(10); - } - - server = nmList.get(0); - Object proxy = Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {INetHandlerLoginClient.class, INetHandlerPlayClient.class}, (proxyobj, method, args) -> - { - if ("toString".equals(method.getName())) { - return "PROXY"; - } - System.out.println(method.getName()); - barrier.await(); - return null; - }); - client.setNetHandler((INetHandler)proxy); - while (!client.isChannelOpen() || !server.isChannelOpen()) { - Thread.sleep(10); - } - client.setConnectionState(EnumConnectionState.LOGIN); - server.setConnectionState(EnumConnectionState.LOGIN); - } - - @Test - public void testNetworkFlow() throws InterruptedException, BrokenBarrierException - { - if (true) return; - assertEquals(EnumConnectionState.LOGIN, client.channel().attr(NetworkManager.PROTOCOL_ATTRIBUTE_KEY).get()); - assertEquals(EnumConnectionState.LOGIN, server.channel().attr(NetworkManager.PROTOCOL_ATTRIBUTE_KEY).get()); - server.sendPacket(vanillapackets[0]); - barrier.await(); - client.setConnectionState(EnumConnectionState.PLAY); - server.sendPacket(vanillapackets[1]); - } -} diff --git a/src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetHandler1.java b/src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetHandler1.java deleted file mode 100644 index 26a2b8354c..0000000000 --- a/src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetHandler1.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Minecraft Forge - * Copyright (c) 2016-2019. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package net.minecraftforge.fml.test.simplenet; - -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.network.NetworkEvent; - -public class SimpleNetHandler1 implements IMessageHandler -{ - @Override - public SimpleNetTestMessage2 onMessage(SimpleNetTestMessage1 message, NetworkEvent.Context context) - { - return null; - } - -} diff --git a/src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetHandler2.java b/src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetHandler2.java deleted file mode 100644 index f362ba74b8..0000000000 --- a/src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetHandler2.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Minecraft Forge - * Copyright (c) 2016-2019. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package net.minecraftforge.fml.test.simplenet; - -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.network.NetworkEvent; - -public class SimpleNetHandler2 implements IMessageHandler -{ - @Override - public SimpleNetTestMessage1 onMessage(SimpleNetTestMessage2 message, NetworkEvent.Context context) - { - return null; - } - -} diff --git a/src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetTestMessage1.java b/src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetTestMessage1.java deleted file mode 100644 index a11432f7ef..0000000000 --- a/src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetTestMessage1.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Minecraft Forge - * Copyright (c) 2016-2019. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package net.minecraftforge.fml.test.simplenet; - -import io.netty.buffer.ByteBuf; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; - -public class SimpleNetTestMessage1 implements IMessage -{ - @Override - public void fromBytes(ByteBuf buf) - { - } - - @Override - public void toBytes(ByteBuf buf) - { - } - -} diff --git a/src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetTestMessage2.java b/src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetTestMessage2.java deleted file mode 100644 index 321eef72c8..0000000000 --- a/src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetTestMessage2.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Minecraft Forge - * Copyright (c) 2016-2019. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package net.minecraftforge.fml.test.simplenet; - -import io.netty.buffer.ByteBuf; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; - -public class SimpleNetTestMessage2 implements IMessage -{ - - @Override - public void fromBytes(ByteBuf buf) - { - } - - @Override - public void toBytes(ByteBuf buf) - { - } - -} diff --git a/src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetTester.java b/src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetTester.java deleted file mode 100644 index a7c0e3f793..0000000000 --- a/src/test/java/net/minecraftforge/fml/test/simplenet/SimpleNetTester.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Minecraft Forge - * Copyright (c) 2016-2019. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package net.minecraftforge.fml.test.simplenet; - -import net.minecraftforge.fml.common.network.NetworkRegistry; -import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; -import net.minecraftforge.api.distmarker.Dist; -import org.junit.Test; - -import static org.junit.Assert.assertTrue; - -public class SimpleNetTester -{ - - @Test - public void test() - { - SimpleNetworkWrapper simpleChannel = NetworkRegistry.INSTANCE.newSimpleChannel("TEST"); - simpleChannel.registerMessage(SimpleNetHandler1.class, SimpleNetTestMessage1.class, 1, Side.SERVER); - simpleChannel.registerMessage(SimpleNetHandler2.class, SimpleNetTestMessage2.class, 2, Side.CLIENT); - assertTrue("Hello", true); - } - -} diff --git a/src/test/java/net/minecraftforge/test/BiomeSpawnableListTest.java b/src/test/java/net/minecraftforge/test/BiomeSpawnableListTest.java index 8a57a67833..2f2b4e3013 100644 --- a/src/test/java/net/minecraftforge/test/BiomeSpawnableListTest.java +++ b/src/test/java/net/minecraftforge/test/BiomeSpawnableListTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.test; @@ -89,3 +90,4 @@ public class BiomeSpawnableListTest assertFalse("The SpawnListEntry wasn't removed", containsEntryAfterRemove); } } +*/ diff --git a/src/test/java/net/minecraftforge/test/BufferBuilderExpansionTest.java b/src/test/java/net/minecraftforge/test/BufferBuilderExpansionTest.java index 807ef1938c..cfa24769b9 100644 --- a/src/test/java/net/minecraftforge/test/BufferBuilderExpansionTest.java +++ b/src/test/java/net/minecraftforge/test/BufferBuilderExpansionTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.test; @@ -150,3 +151,4 @@ public class BufferBuilderExpansionTest assertTrue("BufferBuilder's capacity didn't change.", buffer.getByteBuffer().capacity() > prevCap); } } +*/ diff --git a/src/test/java/net/minecraftforge/test/ConfigurationTest.java b/src/test/java/net/minecraftforge/test/ConfigurationTest.java index 71135ddb61..f66ff12871 100644 --- a/src/test/java/net/minecraftforge/test/ConfigurationTest.java +++ b/src/test/java/net/minecraftforge/test/ConfigurationTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.test; @@ -96,3 +97,4 @@ public class ConfigurationTest { assertEquals("The property's comment was changed", "enabled property comment", backgroundProperty.getComment()); } } +*/ diff --git a/src/test/java/net/minecraftforge/test/EnumHelperTest.java b/src/test/java/net/minecraftforge/test/EnumHelperTest.java index 585a28e061..b5a906629b 100644 --- a/src/test/java/net/minecraftforge/test/EnumHelperTest.java +++ b/src/test/java/net/minecraftforge/test/EnumHelperTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.test; @@ -180,3 +181,4 @@ public class EnumHelperTest //Assert.assertEquals(BiomeDictionary.Type.getType("NEWTYPE"), BiomeDictionary.Type.getType("NEWTYPE")); } } +*/ diff --git a/src/test/java/net/minecraftforge/test/SelectorHandlerTest.java b/src/test/java/net/minecraftforge/test/SelectorHandlerTest.java index 82ea88dcfd..f1144f1be0 100644 --- a/src/test/java/net/minecraftforge/test/SelectorHandlerTest.java +++ b/src/test/java/net/minecraftforge/test/SelectorHandlerTest.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.test; @@ -67,3 +68,4 @@ public class SelectorHandlerTest } } } +*/ diff --git a/src/test/java/net/minecraftforge/test/TestAnnotationParser.java b/src/test/java/net/minecraftforge/test/TestAnnotationParser.java index e1d9f19962..44271f0b15 100644 --- a/src/test/java/net/minecraftforge/test/TestAnnotationParser.java +++ b/src/test/java/net/minecraftforge/test/TestAnnotationParser.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.test; @@ -187,3 +188,4 @@ public class TestAnnotationParser } } } +*/ diff --git a/src/test/java/net/minecraftforge/test/TestProgressBar.java b/src/test/java/net/minecraftforge/test/TestProgressBar.java index 8dd8177162..46d68b75ef 100644 --- a/src/test/java/net/minecraftforge/test/TestProgressBar.java +++ b/src/test/java/net/minecraftforge/test/TestProgressBar.java @@ -15,7 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ + *//* + package net.minecraftforge.test; @@ -193,3 +194,4 @@ public class TestProgressBar } } } +*/ diff --git a/src/test/java/net/minecraftforge/testmods/TestOBJModelMod.java b/src/test/java/net/minecraftforge/testmods/TestOBJModelMod.java new file mode 100644 index 0000000000..a0353ec1e2 --- /dev/null +++ b/src/test/java/net/minecraftforge/testmods/TestOBJModelMod.java @@ -0,0 +1,51 @@ +package net.minecraftforge.testmods; + +import net.minecraft.client.renderer.model.IBakedModel; +import net.minecraft.client.renderer.model.IUnbakedModel; +import net.minecraft.client.renderer.model.ModelResourceLocation; +import net.minecraft.client.renderer.vertex.DefaultVertexFormats; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.event.ModelBakeEvent; +import net.minecraftforge.client.model.BasicState; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.client.model.ModelLoaderRegistry; +import net.minecraftforge.client.model.obj.OBJLoader; +import net.minecraftforge.client.model.obj.OBJModel; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +@Mod("testobjmodelmod") +public class TestOBJModelMod { + private static final Logger LOGGER = LogManager.getLogger(); + + public TestOBJModelMod() { + FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); + } + + private void doClientStuff(final FMLClientSetupEvent event) { + OBJLoader.INSTANCE.addDomain("testobjmodelmod"); + } + + @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD) + public static class RegistryEvents { + @SubscribeEvent + public static void onModelBakeEvent(ModelBakeEvent event) { + try { + // Try to load an OBJ model (placed in src/main/resources/assets/examplemod/models/) + IUnbakedModel model = ModelLoaderRegistry.getModelOrMissing(new ResourceLocation("testobjmodelmod:sample_model.obj")); + + if (model instanceof OBJModel) { + // If loading OBJ model succeeds, bake the model and replace stick's model with the baked model + IBakedModel bakedModel = model.bake(event.getModelLoader(), ModelLoader.defaultTextureGetter(), new BasicState(model.getDefaultState(), false), DefaultVertexFormats.ITEM); + event.getModelRegistry().put(new ModelResourceLocation("stick", "inventory"), bakedModel); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + } +} diff --git a/src/test/resources/META-INF/mods.toml b/src/test/resources/META-INF/mods.toml index d0ba0e7efd..a7309080b9 100644 --- a/src/test/resources/META-INF/mods.toml +++ b/src/test/resources/META-INF/mods.toml @@ -1,10 +1,12 @@ modLoader="javafml" -loaderVersion="[2.0,)" +loaderVersion="[28,)" [[mods]] - modId="forgedebugmodeldata" + modId="testobjmodelmod" #[[mods]] -# modId="forgedebugmodelloaderregistry" +# modId="forgedebugmodeldata" +##[[mods]] +## modId="forgedebugmodelloaderregistry" [[mods]] modId="forge_blockstate_retexture_test" [[mods]] @@ -15,28 +17,28 @@ loaderVersion="[2.0,)" modId="base_block_place_event_test" [[mods]] modId="farmland_trample_test" -[[mods]] - modId="farmland_water_test" -#[[mods]] # Fluid System needs implementing -# modId="fog_color_in_material_test" +#[[mods]] +# modId="farmland_water_test" +##[[mods]] # Fluid System needs implementing +## modId="fog_color_in_material_test" [[mods]] modId="neighbor_notify_event_test" -[[mods]] - modId="block_particle_effects_test" +#[[mods]] +# modId="block_particle_effects_test" [[mods]] modId="ai_node_type_test" [[mods]] modId="block_place_event_test" -[[mods]] - modId="portal_spawn_event_test" +#[[mods]] +# modId="portal_spawn_event_test" [[mods]] modId="slipperiness_test" [[mods]] modId="custom_slime_block_test" [[mods]] modId="client_chat_event_test" -#[[mods]] # Client Command System doesn't exist yet -# modId="client_command_test" +##[[mods]] # Client Command System doesn't exist yet +## modId="client_command_test" [[mods]] modId="command_event_test" [[mods]] diff --git a/src/test/resources/assets/testobjmodelmod/models/sample_model.mtl b/src/test/resources/assets/testobjmodelmod/models/sample_model.mtl new file mode 100644 index 0000000000..5d58e3fbb9 --- /dev/null +++ b/src/test/resources/assets/testobjmodelmod/models/sample_model.mtl @@ -0,0 +1,3 @@ +newmtl mat_sample +Kd 1.00000 1.00000 1.00000 +d 0.50000 diff --git a/src/test/resources/assets/testobjmodelmod/models/sample_model.obj b/src/test/resources/assets/testobjmodelmod/models/sample_model.obj new file mode 100644 index 0000000000..1842556aed --- /dev/null +++ b/src/test/resources/assets/testobjmodelmod/models/sample_model.obj @@ -0,0 +1,37 @@ +mtllib sample_model.mtl + +v 0.250000 0.625000 0.750000 +v 0.250000 0.000000 0.750000 +v 0.750000 0.625000 0.750000 +v 0.750000 0.000000 0.750000 +v 0.750000 0.625000 0.250000 +v 0.750000 0.000000 0.250000 +v 0.250000 0.625000 0.250000 +v 0.250000 0.000000 0.250000 + +vt 0.25000 0.37500 +vt 0.75000 0.37500 +vt 0.75000 1.00000 +vt 0.25000 1.00000 +vt 0.25000 0.25000 +vt 0.75000 0.25000 +vt 0.75000 0.75000 +vt 0.25000 0.75000 + +vn 0.00000 0.00000 1.00000 +vn 1.00000 0.00000 0.00000 +vn 0.00000 0.00000 -1.00000 +vn -1.00000 0.00000 0.00000 +vn 0.00000 1.00000 0.00000 +vn 0.00000 -1.00000 0.00000 + +g sample + +usemtl mat_sample + +f 2/4/1 4/3/1 3/2/1 1/1/1 +f 4/4/2 6/3/2 5/2/2 3/1/2 +f 6/4/3 8/3/3 7/2/3 5/1/3 +f 8/4/4 2/3/4 1/2/4 7/1/4 +f 1/8/5 3/7/5 5/6/5 7/5/5 +f 8/8/6 6/7/6 4/6/6 2/5/6