mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 19:59:42 +00:00
Regenerate patches with relative headers. This should lower conflicts in future PRs.
Convert Forge to use Official mappings. Mojang released their obfuscation mappings but we have not used them up until now due to wanting to get their license to be more explicitly permissive. It is clear that their intent is to allow us to use their names for developing mods like this. See the full wording, and our interpretation here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
This commit is contained in:
1 parent
802298d99d
commit
a95b968c13
832 files changed
+4464
-4373
No files matched your search
@@ -53,9 +53,9 @@ public class CompositeModelTest
|
||||
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
|
||||
|
||||
public static RegistryObject<Block> composite_block = BLOCKS.register("composite_block", () ->
|
||||
new Block(Block.Properties.create(Material.WOOD).hardnessAndResistance(10)) {
|
||||
new Block(Block.Properties.of(Material.WOOD).strength(10)) {
|
||||
@Override
|
||||
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder)
|
||||
protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder)
|
||||
{
|
||||
builder.add(BlockStateProperties.HORIZONTAL_FACING);
|
||||
}
|
||||
@@ -64,30 +64,30 @@ public class CompositeModelTest
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockItemUseContext context)
|
||||
{
|
||||
return getDefaultState().with(
|
||||
BlockStateProperties.HORIZONTAL_FACING, context.getPlacementHorizontalFacing()
|
||||
return defaultBlockState().setValue(
|
||||
BlockStateProperties.HORIZONTAL_FACING, context.getHorizontalDirection()
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||
return VoxelShapes.or(
|
||||
makeCuboidShape(5.6, 5.6, 5.6, 10.4, 10.4, 10.4),
|
||||
makeCuboidShape(0, 0, 0, 4.8, 4.8, 4.8),
|
||||
makeCuboidShape(11.2, 0, 0, 16, 4.8, 4.8),
|
||||
makeCuboidShape(0, 0, 11.2, 4.8, 4.8, 16),
|
||||
makeCuboidShape(11.2, 0, 11.2, 16, 4.8, 16),
|
||||
makeCuboidShape(0, 11.2, 0, 4.8, 16, 4.8),
|
||||
makeCuboidShape(11.2, 11.2, 0, 16, 16, 4.8),
|
||||
makeCuboidShape(0, 11.2, 11.2, 4.8, 16, 16),
|
||||
makeCuboidShape(11.2, 11.2, 11.2, 16, 16, 16)
|
||||
box(5.6, 5.6, 5.6, 10.4, 10.4, 10.4),
|
||||
box(0, 0, 0, 4.8, 4.8, 4.8),
|
||||
box(11.2, 0, 0, 16, 4.8, 4.8),
|
||||
box(0, 0, 11.2, 4.8, 4.8, 16),
|
||||
box(11.2, 0, 11.2, 16, 4.8, 16),
|
||||
box(0, 11.2, 0, 4.8, 16, 4.8),
|
||||
box(11.2, 11.2, 0, 16, 16, 4.8),
|
||||
box(0, 11.2, 11.2, 4.8, 16, 16),
|
||||
box(11.2, 11.2, 11.2, 16, 16, 16)
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
public static RegistryObject<Item> composite_item = ITEMS.register("composite_block", () ->
|
||||
new BlockItem(composite_block.get(), new Item.Properties().group(ItemGroup.MISC)) {
|
||||
new BlockItem(composite_block.get(), new Item.Properties().tab(ItemGroup.TAB_MISC)) {
|
||||
@Override
|
||||
public boolean canEquip(ItemStack stack, EquipmentSlotType armorType, Entity entity)
|
||||
{
|
||||
|
||||
@@ -15,8 +15,8 @@ public class DynBucketModelTest
|
||||
public static final String MODID = "dyn_bucket_model_test";
|
||||
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
|
||||
|
||||
public static final RegistryObject<Item> DRIP_BUCKET = ITEMS.register("drip_bucket", () -> new Item(new Item.Properties().group(ItemGroup.MISC)));
|
||||
public static final RegistryObject<Item> LAVA_OBSIDIAN = ITEMS.register("lava_obsidian", () -> new Item(new Item.Properties().group(ItemGroup.MISC)));
|
||||
public static final RegistryObject<Item> DRIP_BUCKET = ITEMS.register("drip_bucket", () -> new Item(new Item.Properties().tab(ItemGroup.TAB_MISC)));
|
||||
public static final RegistryObject<Item> LAVA_OBSIDIAN = ITEMS.register("lava_obsidian", () -> new Item(new Item.Properties().tab(ItemGroup.TAB_MISC)));
|
||||
|
||||
public DynBucketModelTest()
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ public class MultiLayerModelTest
|
||||
if (!ENABLED)
|
||||
return;
|
||||
event.getRegistry().register(
|
||||
new Block(Block.Properties.create(Material.WOOD).notSolid())
|
||||
new Block(Block.Properties.of(Material.WOOD).noOcclusion())
|
||||
{
|
||||
}.setRegistryName(blockId)
|
||||
);
|
||||
@@ -64,7 +64,7 @@ public class MultiLayerModelTest
|
||||
{
|
||||
if (!ENABLED)
|
||||
return;
|
||||
event.getRegistry().register(new BlockItem(TEST_BLOCK, new Item.Properties().group(ItemGroup.MISC)).setRegistryName(TEST_BLOCK.getRegistryName()));
|
||||
event.getRegistry().register(new BlockItem(TEST_BLOCK, new Item.Properties().tab(ItemGroup.TAB_MISC)).setRegistryName(TEST_BLOCK.getRegistryName()));
|
||||
}
|
||||
|
||||
@net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
@@ -73,7 +73,7 @@ public class MultiLayerModelTest
|
||||
if (!ENABLED)
|
||||
return;
|
||||
RenderTypeLookup.setRenderLayer(TEST_BLOCK, (layer) -> {
|
||||
return layer == RenderType.getSolid() || layer == RenderType.getTranslucent();
|
||||
return layer == RenderType.solid() || layer == RenderType.translucent();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,9 +78,9 @@ public class NewModelLoaderTest
|
||||
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
|
||||
|
||||
public static RegistryObject<Block> obj_block = BLOCKS.register("obj_block", () ->
|
||||
new Block(Block.Properties.create(Material.WOOD).hardnessAndResistance(10)) {
|
||||
new Block(Block.Properties.of(Material.WOOD).strength(10)) {
|
||||
@Override
|
||||
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder)
|
||||
protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder)
|
||||
{
|
||||
builder.add(BlockStateProperties.HORIZONTAL_FACING);
|
||||
}
|
||||
@@ -89,21 +89,21 @@ public class NewModelLoaderTest
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockItemUseContext context)
|
||||
{
|
||||
return getDefaultState().with(
|
||||
BlockStateProperties.HORIZONTAL_FACING, context.getPlacementHorizontalFacing()
|
||||
return defaultBlockState().setValue(
|
||||
BlockStateProperties.HORIZONTAL_FACING, context.getHorizontalDirection()
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context)
|
||||
{
|
||||
return Block.makeCuboidShape(2,2,2,14,14,14);
|
||||
return Block.box(2,2,2,14,14,14);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
public static RegistryObject<Item> obj_item = ITEMS.register("obj_block", () ->
|
||||
new BlockItem(obj_block.get(), new Item.Properties().group(ItemGroup.MISC)) {
|
||||
new BlockItem(obj_block.get(), new Item.Properties().tab(ItemGroup.TAB_MISC)) {
|
||||
@Override
|
||||
public boolean canEquip(ItemStack stack, EquipmentSlotType armorType, Entity entity)
|
||||
{
|
||||
@@ -113,23 +113,23 @@ public class NewModelLoaderTest
|
||||
);
|
||||
|
||||
public static RegistryObject<Item> custom_transforms = ITEMS.register("custom_transforms", () ->
|
||||
new Item(new Item.Properties().group(ItemGroup.MISC))
|
||||
new Item(new Item.Properties().tab(ItemGroup.TAB_MISC))
|
||||
);
|
||||
|
||||
public static RegistryObject<Item> custom_vanilla_loader = ITEMS.register("custom_vanilla_loader", () ->
|
||||
new Item(new Item.Properties().group(ItemGroup.MISC))
|
||||
new Item(new Item.Properties().tab(ItemGroup.TAB_MISC))
|
||||
);
|
||||
|
||||
public static RegistryObject<Item> custom_loader = ITEMS.register("custom_loader", () ->
|
||||
new Item(new Item.Properties().group(ItemGroup.MISC))
|
||||
new Item(new Item.Properties().tab(ItemGroup.TAB_MISC))
|
||||
);
|
||||
|
||||
public static RegistryObject<Item> item_layers = ITEMS.register("item_layers", () ->
|
||||
new Item(new Item.Properties().group(ItemGroup.MISC))
|
||||
new Item(new Item.Properties().tab(ItemGroup.TAB_MISC))
|
||||
);
|
||||
|
||||
public static RegistryObject<Item> separate_perspective = ITEMS.register("separate_perspective", () ->
|
||||
new Item(new Item.Properties().group(ItemGroup.MISC))
|
||||
new Item(new Item.Properties().tab(ItemGroup.TAB_MISC))
|
||||
);
|
||||
|
||||
public NewModelLoaderTest()
|
||||
@@ -174,10 +174,10 @@ public class NewModelLoaderTest
|
||||
builder.setTexture(texture);
|
||||
builder.setQuadOrientation(Direction.UP);
|
||||
|
||||
putVertex(builder, 0,1,0.5f, texture.getInterpolatedU(0), texture.getInterpolatedV(0), 1, 1, 1);
|
||||
putVertex(builder, 0,0,0.5f, texture.getInterpolatedU(0), texture.getInterpolatedV(16), 1, 1, 1);
|
||||
putVertex(builder, 1,0,0.5f, texture.getInterpolatedU(16), texture.getInterpolatedV(16), 1, 1, 1);
|
||||
putVertex(builder, 1,1,0.5f, texture.getInterpolatedU(16), texture.getInterpolatedV(0), 1, 1, 1);
|
||||
putVertex(builder, 0,1,0.5f, texture.getU(0), texture.getV(0), 1, 1, 1);
|
||||
putVertex(builder, 0,0,0.5f, texture.getU(0), texture.getV(16), 1, 1, 1);
|
||||
putVertex(builder, 1,0,0.5f, texture.getU(16), texture.getV(16), 1, 1, 1);
|
||||
putVertex(builder, 1,1,0.5f, texture.getU(16), texture.getV(0), 1, 1, 1);
|
||||
|
||||
modelBuilder.addGeneralQuad(builder.build());
|
||||
}
|
||||
|
||||
@@ -62,9 +62,9 @@ public class TRSRTransformerTest {
|
||||
private static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID);
|
||||
private static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
|
||||
|
||||
private static final RegistryObject<Block> TEST_BLOCK = BLOCKS.register("test", () -> new Block(Block.Properties.create(Material.ROCK)));
|
||||
private static final RegistryObject<Block> TEST_BLOCK = BLOCKS.register("test", () -> new Block(Block.Properties.of(Material.STONE)));
|
||||
@SuppressWarnings("unused")
|
||||
private static final RegistryObject<Item> TEST_ITEM = ITEMS.register("test", () -> new BlockItem(TEST_BLOCK.get(), new Item.Properties().group(ItemGroup.MISC)));
|
||||
private static final RegistryObject<Item> TEST_ITEM = ITEMS.register("test", () -> new BlockItem(TEST_BLOCK.get(), new Item.Properties().tab(ItemGroup.TAB_MISC)));
|
||||
|
||||
public TRSRTransformerTest() {
|
||||
final IEventBus mod = FMLJavaModLoadingContext.get().getModEventBus();
|
||||
@@ -118,8 +118,8 @@ public class TRSRTransformerTest {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAmbientOcclusion() {
|
||||
return base.isAmbientOcclusion();
|
||||
public boolean useAmbientOcclusion() {
|
||||
return base.useAmbientOcclusion();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -128,18 +128,18 @@ public class TRSRTransformerTest {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSideLit() {
|
||||
return base.isSideLit();
|
||||
public boolean usesBlockLight() {
|
||||
return base.usesBlockLight();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer() {
|
||||
return base.isBuiltInRenderer();
|
||||
public boolean isCustomRenderer() {
|
||||
return base.isCustomRenderer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture() {
|
||||
return base.getParticleTexture();
|
||||
public TextureAtlasSprite getParticleIcon() {
|
||||
return base.getParticleIcon();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -48,13 +48,13 @@ public class NameplateRenderingEventTest
|
||||
|
||||
if(event.getEntity() instanceof CowEntity)
|
||||
{
|
||||
event.setContent(new StringTextComponent("Evil Cow").mergeStyle(TextFormatting.RED));
|
||||
event.setContent(new StringTextComponent("Evil Cow").withStyle(TextFormatting.RED));
|
||||
event.setResult(Event.Result.ALLOW);
|
||||
}
|
||||
|
||||
if(event.getEntity() instanceof PlayerEntity)
|
||||
{
|
||||
event.setContent(event.getEntity().getDisplayName().deepCopy().mergeStyle(TextFormatting.GOLD));
|
||||
event.setContent(event.getEntity().getDisplayName().copy().withStyle(TextFormatting.GOLD));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,9 +40,9 @@ public class RenderLocalPlayerTest
|
||||
if (ENABLED && event.getItemStack().getItem() == Items.STICK)
|
||||
{
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
if (mc.getRenderViewEntity() == mc.player)
|
||||
if (mc.getCameraEntity() == mc.player)
|
||||
{
|
||||
mc.setRenderViewEntity(event.getTarget());
|
||||
mc.setCameraEntity(event.getTarget());
|
||||
|
||||
event.setCancellationResult(ActionResultType.SUCCESS);
|
||||
event.setCanceled(true);
|
||||
@@ -56,9 +56,9 @@ public class RenderLocalPlayerTest
|
||||
if (ENABLED && event.getItemStack().getItem() == Items.STICK)
|
||||
{
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
if (mc.getRenderViewEntity() != mc.player)
|
||||
if (mc.getCameraEntity() != mc.player)
|
||||
{
|
||||
mc.setRenderViewEntity(mc.player);
|
||||
mc.setCameraEntity(mc.player);
|
||||
|
||||
event.setCancellationResult(ActionResultType.SUCCESS);
|
||||
event.setCanceled(true);
|
||||
|
||||
@@ -36,6 +36,6 @@ public class StencilEnableTest {
|
||||
|
||||
private void clientSetup(FMLClientSetupEvent event) {
|
||||
if (ENABLED)
|
||||
event.enqueueWork(() -> Minecraft.getInstance().getFramebuffer().enableStencil());
|
||||
event.enqueueWork(() -> Minecraft.getInstance().getMainRenderTarget().enableStencil());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user